-(void)setMedicineList:(NSString*)btnText:(NSString*)kana:(NSString*)skana
{
if(mdcnList != nil)
{
[mdcnList release];
}
mdcnList = [[MedicineList alloc]getMedicineList:btnText:kana:skana]; // Memeory leak
[medListView setMdcnList:mdcnList];
[btnText release];
//[mdcnList release]; // Not work
}
How to release mdcnList to avoid "Potential leak of an object allocated on line 576" warning ? "getMedicineList" is another function. MedicineList is Class.