On Sun, Mar 21, 2010 at 12:48:00AM -0000, David Chisnall wrote: > Made ETXMLNullHandler destroy itself when it finishes parsing. The > way this is done violates some of the standard OpenStep memory > management idioms. It's worth fixing this properly at some point, but > it will require changing things in XMPPKit. Currently, subclasses of > this in XMPPKit are just leaking - they're allocated with +alloc and > never released. Ideally, they should probably be using a named > constructor, rather than +alloc. The old code, which was doing [self > retain] in -setParser: was clearly wrong, but in a different way.
My idea of a proper fix would be to have user code allocate autoreleased handlers if they are not needed after parsing. We would then have the parents keep track of their children (just add them to an array) and remove them on -endElement:. If that sound's reasonable I'll take over the job of doing that (in XMPPKit and EtoileSerialize as well). Cheers, Niels _______________________________________________ Etoile-dev mailing list Etoile-dev@gna.org https://mail.gna.org/listinfo/etoile-dev