处理枚举时是否必须注意内存?这是我声明我的枚举类型的地方。它在另一个 .h 文件中这是我尝试声明变量的地方
在那之后我是否要做类似的事情
// 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