[macruby-changes] [4469] MacRuby/trunk/bs.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Aug 26 16:33:33 PDT 2010
Revision: 4469
http://trac.macosforge.org/projects/ruby/changeset/4469
Author: watson1978 at gmail.com
Date: 2010-08-26 16:33:33 -0700 (Thu, 26 Aug 2010)
Log Message:
-----------
Fixed the Leak
Modified Paths:
--------------
MacRuby/trunk/bs.c
Modified: MacRuby/trunk/bs.c
===================================================================
--- MacRuby/trunk/bs.c 2010-08-26 20:43:06 UTC (rev 4468)
+++ MacRuby/trunk/bs.c 2010-08-26 23:33:33 UTC (rev 4469)
@@ -454,6 +454,7 @@
/* check if the given framework path has not been loaded already */
cf_path = CFStringCreateWithFileSystemRepresentation(kCFAllocatorMalloc,
path);
+ CFMakeCollectable(cf_path);
for (unsigned i = 0, count = CFArrayGetCount(parser->loaded_paths);
i < count; i++) {
CFStringRef s = CFArrayGetValueAtIndex(parser->loaded_paths, i);
@@ -1269,7 +1270,6 @@
}
}
}
- CFRelease(cf_path);
if (success && options == BS_PARSE_OPTIONS_LOAD_DYLIBS && framework_path != NULL) {
char buf[PATH_MAX];
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100826/923cb08b/attachment.html>
More information about the macruby-changes
mailing list