열거 형을 처리 할 때 메모리를 관리해야합니까? 여기가 내 열거 형을 선언 한 곳입니다. 내가 그 후
을 변수 선언하려고 나는 O를 가지고 수행이 단지 기본 C 타입입니다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