• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Customized document creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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/


References: 
 >Re: Customized document creation (From: Brian Webster <email@hidden>)

  • Prev by Date: Re: Customized document creation
  • Next by Date: Re: interfacing c++ -> cocoa/aqua
  • Previous by thread: Re: Customized document creation
  • Next by thread: [Semi-OT] Utility classes
  • Index(es):
    • Date
    • Thread