I found the problem. It seems rather than autoreleasing the outputBitmapRep, I should first CGImageReleasethe 'thickenedCGImg'. This creates a dilemma because thickenedCGImg lies inside a function.
I have to change the function to return a CGImage instead. From Apple's Cocoa document, it says the NSImageBitmapRep which [NSImgRep CGImage] returns is 'Readonly', so that probably means releasing the object doesn't release the correspondent CGImage. On Tue, Sep 8, 2009 at 12:06 AM, Bill Bumgarner <b...@mac.com> wrote: > On Sep 7, 2009, at 4:45 AM, DairyKnight wrote: > > FooProgram(1343,0xa01e1720) malloc: *** mmap(size=30855168) failed (error >> code=12) >> >> *** error: can't allocate region >> >> *** set a breakpoint in malloc_error_break to debug >> >> 2009-09-07 19:37:17.606 KindPDF[1343:10b] *** >> NSCopyMemoryPages(0xfc18a000, >> 0x0, 30851072) failed >> > > You have run out of memory and the allocator has failed. In this case, it > is a memory-mapped file that is failing which leads to a call to > NSCopyMemoryPages() with an address of 0x0 as the destination. > > Either your app is leaking memory -- which may be in the form of > over-caching -- or you are simply trying to shove too much stuff into memory > at the same time. > > Use Instruments' Object Alloc instrument to see what is chewing up the > space. > > b.bum > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
