<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -329,6 +329,8 @@
 		C01FCF4F08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
+				ARCHS = &quot;$(ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1)&quot;;
+				ARCHS_STANDARD_64_BIT_PRE_XCODE_3_1 = x86_64;
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;
 				GCC_WARN_UNUSED_VARIABLE = YES;</diff>
      <filename>GUIConsole/JSCocoa.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -11,6 +11,10 @@
 
 int main(int argc, char *argv[])
 {
+#ifdef __LP64__
+    printf(&quot;__LP64__!\n&quot;);
+#endif
+
 	id pool = [[NSAutoreleasePool alloc] init];
 	
 	id c = [JSCocoaController sharedController];</diff>
      <filename>GUIConsole/main.m</filename>
    </modified>
    <modified>
      <diff>@@ -254,22 +254,44 @@ const JSClassDefinition kJSClassDefinitionEmpty = { 0, 0,
 	[self setUseSafeDealloc:NO];
 	[self unlinkAllReferences];
 	JSGarbageCollect(ctx);
-
+    
 	controllerCount--;
 	if (controllerCount == 0)
 	{
-		if (OSXObjectClass)		JSClassRelease(OSXObjectClass);
-		if (jsCocoaObjectClass)	JSClassRelease(jsCocoaObjectClass);
-		if (hashObjectClass)	JSClassRelease(hashObjectClass);
-
+		if (OSXObjectClass) {
+            JSClassRelease(OSXObjectClass);
+            OSXObjectClass = nil;
+        }
+        
+		if (jsCocoaObjectClass) {
+            JSClassRelease(jsCocoaObjectClass);
+            jsCocoaObjectClass = nil;
+        }
+        
+		if (hashObjectClass) {
+            JSClassRelease(hashObjectClass);
+            hashObjectClass = nil;
+        }
+        
+        // we need to nil these all out, since they are static
+        // and if we make another JSCocoaController after this- they will
+        // still be around and that's kinda bad (like crashing bad).
 		[sharedInstanceStats release];
+        sharedInstanceStats = nil;
 		[closureHash release];
+        closureHash = nil;
 		[jsFunctionSelectors release];
+        jsFunctionSelectors = nil;
 		[jsFunctionClasses release];
+        jsFunctionClasses = nil;
 		[jsFunctionHash release];
+        jsFunctionHash = nil;
 		[splitCallCache release];
+        splitCallCache = nil;
 		[jsClassParents release];
+        jsClassParents = nil;
 		[boxedObjects release];
+        boxedObjects = nil;
 	}
 
 	JSGlobalContextRelease(ctx);</diff>
      <filename>JSCocoa/JSCocoaController.m</filename>
    </modified>
    <modified>
      <diff>@@ -327,7 +327,7 @@
 		C05733CC08A9546B00998B17 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			buildSettings = {
-				ARCHS = &quot;$(ARCHS_STANDARD_32_BIT)&quot;;
+				ARCHS = &quot;$(ARCHS_STANDARD_64_BIT)&quot;;
 				GCC_C_LANGUAGE_STANDARD = c99;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_WARN_ABOUT_RETURN_TYPE = YES;</diff>
      <filename>Multiple JSCocoa instances/Multiple JSCocoa instances.xcodeproj/project.pbxproj</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 		Method('add:and:').encoding('int int int').fn = function(a, b)
 		{
 			log('Objc class method adding ' + a + ' and ' + b)
+            log(NSMakeRect(1, 1, 1, 1));
 			return a+b+magic
 		}
 	}</diff>
      <filename>Multiple JSCocoa instances/classCode.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f260b28f01031a063a382996afc8eb170f622822</id>
    </parent>
  </parents>
  <author>
    <name>August Mueller</name>
    <email>gus@flyingmeat.com</email>
  </author>
  <url>http://github.com/parmanoir/jscocoa/commit/8cb14d5fb329f2504eeb696140a18538d6289d45</url>
  <id>8cb14d5fb329f2504eeb696140a18538d6289d45</id>
  <committed-date>2009-09-13T18:08:02-07:00</committed-date>
  <authored-date>2009-09-13T15:14:58-07:00</authored-date>
  <message>fixed a crasher where references to dealloced global vars were left around,
and things just went south when you tried to startup another JSCocoaController
after the last one had been dealloc'd

Signed-off-by: Patrick Geiller &lt;parmanoir@gmail.com&gt;</message>
  <tree>f65a5b1b056fd1bae6574a96a22c48bf19fa6396</tree>
  <committer>
    <name>Patrick Geiller</name>
    <email>parmanoir@gmail.com</email>
  </committer>
</commit>
