當我處理枚舉時,是否需要照顧內存? 這是我宣佈我的枚舉類型。這是另一個.h文件中 這是我嘗試聲明變量
之後,我必須Ø做這樣的事情Objective C typedef枚舉內存管理
// This is where I declared my enum type. It is in another .h file
typedef enum CardTypes
{
HEART = 1,
DIAMOND =2,
CLUB =3,
SPADE = 4
} CardType;
// This is where I attempt to declare variable
CardType cardType=SPADE;
//or
CardType cardType=malloc(size(CardType));
// After that Do I have o do something like that
[cardType release]
//or
free(&card)
Any help will be appreciated , thanks