• 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: Initializing an Array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Initializing an Array


  • Subject: Re: Initializing an Array
  • From: Marcel Weiher <email@hidden>
  • Date: Tue, 22 Jan 2002 21:42:22 +0100

On Tuesday, January 22, 2002, at 08:47 , Jeff Galyan wrote:

I didn't think so, but when I wasn't sending retain to the copied string,
the app would crash on the first call to any method in the class, and the
debugger showed myString's address as 0x0.

This is clearly NOT caused by the string getting deallocated. Deallocating an object does not set references to that object to nil.

Ways you might have gotten a nil-pointer:

1.) you passed nil in
2.) you reset the instance var to nil in the meantime
3.) the object that had its inst-var set is not the same one that you're examining

Marcel
--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.


  • Follow-Ups:
    • Re: Initializing an Array
      • From: Jeff Galyan <email@hidden>
References: 
 >Re: Initializing an Array (From: Jeff Galyan <email@hidden>)

  • Prev by Date: Re: Windows, NSTableView and newie question
  • Next by Date: RE: How to make Tiff with a mask?
  • Previous by thread: Re: Initializing an Array
  • Next by thread: Re: Initializing an Array
  • Index(es):
    • Date
    • Thread