The first problem is short out when i comment out that line i think the list is 
drawn with the frm draw and i m using frm draw after calling that function but 
the second problem is still their

i write that function like that

static void TodayPreference(FormType* frm)
{ 
SysDBListItemType          *dbListIDsP; 
MemHandle                  dbListIDsH; 
static UInt16              dbCount = 0; 
UInt16 counter; 
Boolean                    status;                 
ListType*  lst;
static char **ItemType; 
 
       
     
     
   /* if(dbCount)
        {for(counter=0;counter<dbCount;counter++)
                        {
                                MemPtrFree(ItemType[counter]);
                        }
                        MemPtrFree(ItemType);
                        dbCount=0;         
                
        }*/
                if(frm)
                {
                   lst = (ListType*)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm, 
TodayPrefList)); 
           status = SysCreateDataBaseList(sysFileTApplication, 0,&dbCount, 
&dbListIDsH,true); 
           ItemType = (Char**)MemPtrNew(dbCount * sizeof(Char*)); 
           dbListIDsP = (SysDBListItemType*)MemHandleLock (dbListIDsH); 
     if (status == true && dbCount > 0)   
       { 
        for (counter = 0; counter < dbCount; counter++) 
          {              
                   ItemType[counter] = (Char*)MemPtrNew(dmDBNameLength+1);      
           
                        StrCopy(ItemType[counter], dbListIDsP[counter].name);   
                                         
          }              
            LstSetListChoices (lst,ItemType,dbCount);                    
            //LstDrawList(lst);
            MemHandleUnlock(dbListIDsH);
            for(counter=0;counter<dbCount;counter++)
                        {
                                MemPtrFree(ItemType[counter]);
                        }
                        MemPtrFree(ItemType);
                        dbCount=0;                     
       } 
     } 
  }

the memory must free at the end of the function after drawing the list and even 
we write at the start of the function it has the same problem.I try in the both 
way but it give same merror lick error

Minor error while exiting app: un-freed chunk at 0x00F02C48, size 780 (ownerID 
2) and the size is equal to the
 ItemType = (Char**)MemPtrNew(dbCount * sizeof(Char*)); 

Do u have any other idea abt it. i gone made of it

thanks to help me u solve my first problem.
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to