• 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
C types and memory management
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

C types and memory management


  • Subject: C types and memory management
  • From: "James Winetke" <email@hidden>
  • Date: Mon, 24 Jun 2002 19:56:40 +0000

I'm learning about Cocoa and C memory management simultaneously, and
while the object-based retain/release stuff makes sense (at least once I
get it in the debugger and can fire retainCount messages around), I
haven't quite figured out what's going on with my plain C types. If I
declare a zillion NSRanges locally to a method, they can't be
retained/released, and they resist debugger attention.

My reading suggests, but does not say clearly, that plain C types like
these are allocated in a range of memory called the stack, and are
automatically deallocated when their scope ends.

Is this accurate? If so, is it a complete description of what's going on?
How can I find out how much space is free in the stack?

Thanks for any insight.

Jim

_________________________________________________________________
Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com
_______________________________________________
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.
  • Follow-Ups:
    • Re: C types and memory management
      • From: Ondra Cada <email@hidden>
  • Prev by Date: Re: Scroller position
  • Next by Date: Re: C types and memory management
  • Previous by thread: Re: MultiThreading should I or shouldn't I?
  • Next by thread: Re: C types and memory management
  • Index(es):
    • Date
    • Thread