From: Helge H. <hel...@sk...> - 2001-08-20 08:34:27
|
Hi Sven, are you searching for RC leaks *inside* of lF or in code using lF ? If you look for leaks outside of lF you might consider using the GCObject class instead of NSObject, since it provides a simple, RC based, garbage collector (which tracks cycles ...). Another good way to find memory leaks is Boehm GC in leak mode, but it's now long ago that I used that feature. I think dmalloc also supports a similiar tracing feature. > My next idea would be to somehow wrap NSObject's retain (either on the > source code or on the linker level), and to log the information I > need. But before I do this, I'd just like to know whether there are > better ways. I doubt that you can get the info you want by overiding -retain/-release ! Methods don't know where they are called from. Greetings Helge "Sven C. Koehler" wrote: > I am looking for best practices to debug retain cycles. So far, I > tried to track them down by reading source, which can be very frustrating > when there is a lot of source code; another try was to read lF's internal > data structures (in a category of e.g. NSAutoreleasePool), and to search > those objects that are part of the cycle--unfortunately, it turned out > that lF does not know from where objects were retained (correct me if I am > wrong). > > My next idea would be to somehow wrap NSObject's retain (either on the > source code or on the linker level), and to log the information I > need. But before I do this, I'd just like to know whether there are > better ways. > > Thanks in advance, > > Sven Koehler > > _______________________________________________ > libFoundation-users mailing list > lib...@li... > http://lists.sourceforge.net/lists/listinfo/libfoundation-users -- SKYRIX Software AG - http://www.skyrix.com Web Application Technology for Enterprises |