From: Jay Freeman (saurik) Date: Fri, 2 Apr 2010 04:15:31 +0000 (+0000) Subject: Found a memory management mistake (new Instance should not be transient) while workin... X-Git-Tag: v0.9.432~100 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/15024d7e7c224d837592094932a2da18d17ee015 Found a memory management mistake (new Instance should not be transient) while working on Element. --- 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) {