realbasic-plugins
[Top] [All Lists]

Re: REALpicture and memory management

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: REALpicture and memory management
From: Phil M <phil at mobleybros dot com>
Date: Fri, 21 Jul 2006 10:24:36 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <0EAE1376-C3A0-4C15-8758-1230D7D24658 at mobleybros dot com> <44C098BA dot 5070709 at einhugur dot com> <02AEE728-0224-4468-AD5D-6040AC78AEC0 at mobleybros dot com> <FCEC6FB8-E519-4D1B-8BA2-F2BCC837A726 at elfdata dot com>
On Jul 21, 2006, at 9:44 AM, Theodore H. Smith wrote:

It seems I have a memory leak somewhere and I just have to find it. I disabled the picture so my return value is NULL, and the leak continued to occur so it is something with my code.

REALpicture Function() {
        REALpicture bla = REALnewPicture(a,b,c);
        return bla; // this wonn't leak
}

REALpicture Function() {
        REALpicture bla = REALnewPicture(a,b,c);
        return 0; // this WILL leak
} // because we created "bla", but now nothing can unlock it.

Just so you know.

OK, thanks. I have gotten spoiled with REALbasic memory-management, my university classes didn't really get into memory-management and I don't have any of my C/C++ books with me. It takes me a lot longer than I would like to get this plugin written, but the results are much better than what I was getting in pure REALbasic.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>