Changeset 7621


Ignore:
Timestamp:
Nov 9, 2007, 10:37:49 PM (12 years ago)
Author:
rme
Message:

Fix some Cocoa object leaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/cocoa-ide/cocoa-utils.lisp

    r7618 r7621  
    1616
    1717(objc:defmethod #/init ((self sequence-window-controller))
     18  (call-next-method)
    1819  (let* ((w (new-cocoa-window :activate nil))
    1920         (contentview (#/contentView w))
     
    2122         (scrollview (make-instance 'ns:ns-scroll-view :with-frame contentframe)))
    2223    (#/setWindow: self w)
     24    (#/setDelegate: w self)
     25    (#/setWindowController: w self)
    2326    (#/setHasVerticalScroller: scrollview t)
    2427    (#/setHasHorizontalScroller: scrollview t)
     
    3134    (let* ((table-view (make-instance 'ns:ns-table-view)))
    3235      (#/setDocumentView: scrollview table-view)
     36      (#/release table-view)
    3337      (#/setColumnAutoresizingStyle: table-view #$NSTableViewUniformColumnAutoresizingStyle)
    3438      (setf (slot-value self 'table-view) table-view)
     
    3640        (#/setEditable: column nil)
    3741        (#/setResizingMask: column #$NSTableColumnAutoresizingMask)
    38         (#/addTableColumn: table-view column))
     42        (#/addTableColumn: table-view column)
     43        (#/release column))
    3944      (#/setAutoresizingMask: table-view (logior
    4045                                          #$NSViewWidthSizable
     
    4752      (#/setDoubleAction: table-view (@selector #/sequenceDoubleClick:))
    4853      (#/addSubview: contentview scrollview)
     54      (#/release scrollview)
    4955      self)))
     56
     57(objc:defmethod (#/dealloc :void) ((self sequence-window-controller))
     58  (call-next-method))
     59
     60(objc:defmethod (#/windowWillClose: :void) ((self sequence-window-controller)
     61                                            notification)
     62  (declare (ignore notification))
     63  (#/autorelease self))
    5064
    5165(objc:defmethod (#/sequenceDoubleClick: :void)
Note: See TracChangeset for help on using the changeset viewer.