On 19/08/2012 17:19, Richard Moore wrote:
> On 19 August 2012 16:18, Till Oliver Knoll <till.oliver.kn...@gmail.com> 
> wrote:
>> However it never occured to me to actually try such a thing. I mean,
>> what would be a practical scenario where one wanted to explicitly call a
>> d'tor? So clean up resources before the actual object gets destroyed
>> (assuming that the code inside the d'tor would take care not to delete
>> resources twice, such that it would be okay to call a d'tor several times)?
> It's used when you're writing custom allocators such as a SLAB
> allocator. In that situation you want to separate the running of the
> destructor from the memory allocation.
It can also be used with placement new operator.

Cheers,

Sean
>
> Cheers
>
> Rich.
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to