On quinta-feira, 24 de maio de 2012 16.26.19, Olivier Goffart wrote: > > Then you would also be able to make the "delete" operator work > > consistently with reference-counted QObjects, by overriding it and make > > it just decrement the count (and delete the object if the count is 0). > > No. That's not how the delete operator works. > The operator delete is called after the destructors has already been run, > and its purpose is just to release the memory. the operator delete cannot > decide not to delete.
No, but a QSharedPointer custom deleter can decide not to call delete in the
first place.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
