[vtk-developers] Use of autorelease in Cocoa classes
Sean McBride
sean at rogue-research.com
Tue Feb 5 12:36:57 EST 2013
On Fri, 1 Feb 2013 14:28:11 -0500, Berk Geveci said:
>otool -oV returns empty:
>
>alderaan:misc otool -oV ~/Work/ParaView/git-3.14/build/bin/pvbatch
>/Users/berk/Work/ParaView/git-3.14/build/bin/pvbatch:
hmmm, well, in any case, I doubt your app is GC. In VTK5 there is "VTK_REQUIRED_OBJCXX_FLAGS" which was set to build as both GC and MRR. Now that string is gone in VTK master. No doubt there is some fancy git thing that can tell us when/where/who/why it was removed?
>To provide a bit more detail. When I run the batch program in
>Instruments, I see bunch of leaks originating from:
>
> NSOpenGLContext* context = [[[NSOpenGLContext alloc]
> initWithFormat:pixelFormat
> shareContext:nil] autorelease];
>
>These leaks go away if I yank autorelease and add a release in DestroyWindow.
So I've done a review of the memory management and think I should just bite the bullet and refactor it to both fix your leaks and support ARC.
Cheers,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list