Re: Memory Leak
Re: Memory Leak
- Subject: Re: Memory Leak
- From: "Sean McBride" <email@hidden>
- Date: Mon, 26 May 2008 18:04:23 -0400
- Organization: Rogue Research
On 5/26/08 12:47 PM, Greg Guerin said:
>Sean McBride wrote:
>
>>OK, so one installs an atexit() handler, then what? Use system() to
>>invoke the 'leaks' command line tool? I suppose that could work. But
>>it's a lot of hocus pocus for someone new to the platform.
>>
>>My point was only that competing IDEs (ie Visual Studio) essentially do
>>this magic for you, and that I think it would be a great feature for
>>Xcode to have.
>
>It *would* be a nice addition.
>
>Apple doesn't have to write it, and it doesn't have to be built into Xcode.
>Someone with experience could write it and make it available to all.
Arne's example is a good starting point. I did pretty much the same but
using atexit(). It works, at least mostly.
Still, I suspect there are edge cases that we (the community) would miss
if we each implemented this ourselves. For example, say the Obj-C
garbage collector has not run recently, you'd probably want to call
[[NSGarbageCollector defaultCollector] collectExhaustively] before
invoking system("leaks ...").
--
____________________________________________________________
Sean McBride, B. Eng email@hidden
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden