Changeset 9141


Ignore:
Timestamp:
Apr 12, 2008, 9:36:05 AM (12 years ago)
Author:
gb
Message:

Move terminate method to later in the loading sequence.

Location:
trunk/source/objc-bridge
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/objc-bridge/objc-clos.lisp

    r8379 r9141  
    742742    instance))
    743743
    744 (defmethod terminate ((instance objc:objc-object))
    745   (objc-message-send instance "release"))
    746744
    747745
  • trunk/source/objc-bridge/objc-support.lisp

    r7005 r9141  
    187187  (#/retain instance))
    188188
    189 
     189;;; May have to create/release autorelease pools before the bridge
     190;;; is fully reinitialized, so use low-level OBJC-MESSAGE-SEND
     191;;; and @class.
    190192(defun create-autorelease-pool ()
    191   (#/init (#/alloc ns:ns-autorelease-pool)))
     193  (objc-message-send
     194   (objc-message-send (@class "NSAutoreleasePool") "alloc") "init"))
    192195
    193196(defun release-autorelease-pool (p)
    194   (#/release p))
     197  (objc-message-send p "release" :void))
    195198
    196199
     
    486489
    487490                                         
     491(defmethod terminate ((instance objc:objc-object))
     492  (objc-message-send instance "release"))
    488493
    489494
Note: See TracChangeset for help on using the changeset viewer.