realbasic-plugins
[Top] [All Lists]

Re: String Property Leaks

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: String Property Leaks
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Thu, 15 Jun 2006 22:42:30 +0000
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <DDC8D5BC-9B4E-4844-80D3-E85EBD063A5D at einhugur dot com> <F2B312ED-BA80-4200-9C70-251AF1C6F621 at realsoftware dot com> <F43888DE-E21E-41A4-9E16-63DEAA62B8F8 at einhugur dot com>
Never mind, sorry about the false alarm, it turned out that old evil CW was not actually compiling this project target at all, making the change to call REALUnlockString never get added to the compiled output.

Björn

On 15.6.2006, at 22:31, Björn Eiríksson wrote:

Ohhh and I forgot, I would not even have suspected it if adding XX to one of the font properties in the property browser had not added 2 bytes to the leak.

On 15.6.2006, at 22:27, Jonathan Johnson wrote:


On Jun 15, 2006, at 5:24 PM, Björn Eiríksson wrote:

Hello

I found that string properties with REALstandardGetter and REALstandardSetter, defined like bellow will leak:

{"Font", "StartupLinuxFont", "String", REALpropInvalidate,REALstandardGetter,REALstandardSetter, FieldOffset(TableControlData, StartupLinuxFontName)},

In the Dispose Event of the control then the following is called:

REALUnlockString(me->StartupLinuxFontName);

And the following is called in the Init method of the control:

me->StartupLinuxFontName = REALBuildString("Geneva",6);


The property is not connected to anything else nor accessed or touched in any other place.

Now why does it leak ? Is it a bug in REALbasic handling of REALstandardSetter for REALstring ?

I doubt it's the latter -- that code hasn't changed in an extremely long time (before I even started working here). Is your destructor being called?

-Jon


--
Jonathan Johnson
jonj at realsoftware dot com
REAL Software, Inc.


_______________________________________________
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>



_______________________________________________
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>



_______________________________________________
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>