On 2010-08-10 18:39:03 -0400, "Steven Schveighoffer" <schvei...@yahoo.com> said:

It's only safe if the struct destructor does not deallocate any heap data.

To be even clearer, it's only safe if the struct destructor doesn't access any heap data through one of its members.

And accessing an array or a string could potentially count as accessing heap data too (unless you can be sure it wasn't from the GC-heap).

So destructors called during the collection cycle are a very tricky thing to handle.

--
Michel Fortin
michel.for...@michelf.com
http://michelf.com/

Reply via email to