|
From: <ted...@us...> - 2011-11-01 18:20:11
|
Revision: 1838
http://frontierkernel.svn.sourceforge.net/frontierkernel/?rev=1838&view=rev
Author: tedchoward
Date: 2011-11-01 18:20:05 +0000 (Tue, 01 Nov 2011)
Log Message:
-----------
fix some memory leaks
If I create handles, I should also destroy them when I'm done with them.
Signed-off-by: Ted C. Howard <te...@te...>
Modified Paths:
--------------
Frontier/trunk/Common/source/icon.c
Modified: Frontier/trunk/Common/source/icon.c
===================================================================
--- Frontier/trunk/Common/source/icon.c 2011-11-01 18:19:52 UTC (rev 1837)
+++ Frontier/trunk/Common/source/icon.c 2011-11-01 18:20:05 UTC (rev 1838)
@@ -70,6 +70,7 @@
OSStatus loadicondatafromodb(bigstring bsadricon, bigstring bsicondatatype, Handle *hicon);
boolean ploticonfromodb (const Rect *r, short align, short transform, bigstring bsadricon) {
+#if defined (MACVERSION)
//bigstring bsadricon = "\psystem.verbs.builtins.Frontier.tools.data.nodeTypes.link.icon.mac";
@@ -138,7 +139,14 @@
theErr = PlotIconRef(r, align, transform, kIconServicesNormalUsageFlag, iconRef);
}
+ setemptystring(bsadriconpart);
+ ReleaseIconRef(iconRef);
+ disposehandle((Handle) iconHand);
+
return theErr == noErr;
+#else if defined (WIN95VERSION)
+ return FALSE;
+#endif
}
OSStatus loadicondatafromodb(bigstring bsadricon, bigstring bsicondatatype, Handle *hicon) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|