Re: [AD] Patch for fixing missing NSAutoreleasePools

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I've applied it with some minor changes, haven't compiled it yet but I'm unsure of this:

diff -rupN old/src/macosx/system.m new/src/macosx/system.m
--- old/src/macosx/system.m	2012-04-11 18:12:16.000000000 +0200
+++ new/src/macosx/system.m	2012-05-23 19:00:33.000000000 +0200
@@ -452,7 +452,7 @@ NSImage* NSImageFromAllegroBitmap(ALLEGR
    al_unlock_bitmap(bmp);
    [img addRepresentation:rep];
    [rep release];
-   return [img autorelease];
+   return img;
 }
 
 /* This works as long as there is only one screen */


Trent

On 2012-05-25, at 8:29 PM, Peter Wang wrote:

> On Wed, 23 May 2012 19:42:39 +0200, Pär Arvidsson <arvidsson@xxxxxxxxxx> wrote:
>> Hello!
>> 
>> I promised to send this patch weeks ago, but thesis writing and other life stuff got in the way.
>> 
>> The patch is supposed to fix most leaks as explained in this thread: http://www.allegro.cc/forums/thread/609685
>> 
>> I went through most of the examples to find the functions where pools needed to be placed. I couldn't check the fullscreen examples nor the joystick ones. But I should have found most of the erring Cocoa memory management.
>> 
>> Let me know if there is anything wrong with the patch, or anything else I can do to help!
> 
> I'll try to release 5.1.2 tomorrow.  Can someone check this patch and
> apply it?  Thanks.
> 
> Peter
> 
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> -- 
> https://lists.sourceforge.net/lists/listinfo/alleg-developers





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/