Re: [Pyobjc-dev] Finding memory leaks?
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2010-03-10 20:29:20
|
On 9 Mar, 2010, at 23:00, Orestis Markou wrote: > Hi all, > > just wondering if there is a simple workflow around for finding memory leaks in PyObjC/Cocoa apps. > > Running with instruments/Leaks is not very helpful (or perhaps I don't know how to set it up correctly). Instruments and leaks aren't very useful because because those tools don't know about Python objects, and more importantly the Python memory manager. I tend to use a combination of leaks and Python's gc module to find sources of unexpected memory usage. What also can help is to create a separate python build using '--without-pymalloc'. This results in a slower binary, but one that uses straight malloc/free instead of Python's memory manager. This makes using Apple's tools more productive. Ronald |