Re: Customized document creation
Re: Customized document creation
- Subject: Re: Customized document creation
- From: Michael Dagate <email@hidden>
- Date: Sat, 7 Jul 2001 16:13:46 -0500
Thanks, Brian. It didn't occur to me, but it makes sense that
-addDocument would increase the reference count, and, thus, I should
decrease it. :P
Michael
On Saturday, July 7, 2001, at 03:56 PM, Brian Webster wrote:
on 7/7/01 2:47 PM, email@hidden at
email@hidden wrote:
I have a small problem with my custom document creation. It seems that
my document object no longer gets released properly. Rather than
subclass NSDocumentController, I made a category and created my own
document-creation method -newDocumentWithData. The code follows Brian's
example below.
If I use the standard -newDocument method, the document object gets
released as expected (my window controller calls
-setShouldCloseDocument
to release the document when the window closes). Could
-newDocumentWithData be missing a step?
My sample code didn't release the document after adding it to the list
of
documents in the document controller. Does yours? It should.
--
Brian Webster
email@hidden
http://www.owlnet.rice.edu/~bwebster/