realbasic-plugins
[Top] [All Lists]

String Property Leaks

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: String Property Leaks
From: Björn Eiríksson <bjorn at einhugur dot com>
Date: Thu, 15 Jun 2006 22:24:50 +0000
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
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 ?

If I go to the property browser and change the font name to GenevaXX, then I will leak 2 more bytes.

--
______________________________________________________________________
Björn Eiríksson                        bjorn at einhugur dot com
Einhugur Software
http://www.einhugur.com/
______________________________________________________________________
Einhugur Software has sold its products in 53 countries world wide.
______________________________________________________________________
For support:                           support at einhugur dot com
To post on the maillist:               einhugur at yahoogroups dot com


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