• 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
NSAutoreleasePool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSAutoreleasePool


  • Subject: NSAutoreleasePool
  • From: "Amit Sadana" <email@hidden>
  • Date: Wed, 14 Jan 2004 18:14:33 +0530
  • Thread-topic: NSAutoreleasePool

Consider the following sample code:



-(void) myMethod

{

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];



// lot of stuff going on here with lot of memory allocations



[pool release];



}



1. Do I have to explicitly do an autorelease to ensure that is handled
by my current NSAutorelease pool



2. What if I want to release some allocated memory on my own by doing an
explicit [... release] call. I have observed this is not at all
possible. It simply causes the application to crash. This holds true
even if I am doing the allocation and release at a very deep nested
level place in code called from a method (within NSAutorelease alloc and
pool release block) from -myMethod
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSDate and Date formatters
  • Next by Date: [ANN : my new application is out]
  • Previous by thread: Re: index of line wrap
  • Next by thread: Re: NSAutoreleasePool
  • Index(es):
    • Date
    • Thread