当我处理枚举时,是否需要照顾内存? 这是我宣布我的枚举类型。这是另一个.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