On Fri, Dec 25, 2009 at 10:52 PM, Michael Craig wrote:
> #import
>
> static NSArray *suitArray;
I doubt you really mean this. When you put this in your header file,
every file that includes "Card.h" has its own, separate copy of
suitArray. If you want to export a shared global into every file, t
On 26/12/2009, at 3:52 PM, Michael Craig wrote:
> I'm building a class Card that represents a playing card in a simulation. I
> want instances of Card to be initialized with two integers that represent
> the suit and value. When an instance of Card is queried for its suit or
> value, it returns a
Ah, that makes perfect sense. Thank you!
Michael S Craig
On Sat, Dec 26, 2009 at 12:12 AM, Dave Keck wrote:
> Presumably you're not using garbage collection. If that's the case,
> suitArray is being deallocated because you didn't retain it. Probably
> time to check out the memory management gu
Presumably you're not using garbage collection. If that's the case,
suitArray is being deallocated because you didn't retain it. Probably
time to check out the memory management guidelines:
http://developer.apple.com/mac/library/documentation/cocoa/Conceptual/MemoryMgmt/Articles/mmObjectOwner
Hi folks,
I'm building a class Card that represents a playing card in a simulation. I
want instances of Card to be initialized with two integers that represent
the suit and value. When an instance of Card is queried for its suit or
value, it returns an NSString (@"Club", @"Spade", @"4", @"King", e