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. Cheers Rich. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest