]> git.saurik.com Git - cycript.git/commitdiff
Attempt to garbage collect before using choose().
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 20 Jan 2014 12:43:32 +0000 (04:43 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 20 Jan 2014 12:43:32 +0000 (04:43 -0800)
ObjectiveC/Library.mm

index 742e3ef481e0b9857b012a17cb210ca9a3c80827..a31c9713f730a30f023f6238937892c0363c6fa5 100644 (file)
@@ -2305,6 +2305,8 @@ static JSValueRef choose(JSContextRef context, JSObjectRef object, JSObjectRef _
     if (count != 1)
         throw CYJSError(context, "choose() takes a class argument");
 
+    CYGarbageCollect(context);
+
     CYPool pool;
     Class _class(CYCastNSObject(&pool, context, arguments[0]));