From 15024d7e7c224d837592094932a2da18d17ee015 Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 2 Apr 2010 04:15:31 +0000 Subject: [PATCH] Found a memory management mistake (new Instance should not be transient) while working on Element. --- ObjectiveC/Library.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index e8777b4..8776ca0 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -2107,7 +2107,7 @@ static JSObjectRef Instance_new(JSContextRef context, JSObjectRef object, size_t if (count > 1) throw CYJSError(context, "incorrect number of arguments to Instance constructor"); id self(count == 0 ? nil : CYCastPointer(context, arguments[0])); - return Instance::Make(context, self); + return CYMakeInstance(context, self, false); } CYCatch } static JSValueRef CYValue_getProperty_value(JSContextRef context, JSObjectRef object, JSStringRef property, JSValueRef *exception) { -- 2.49.0