now try to this way 
i allready stuck with this fucking problem and waist my lot of time to solve 
but i finally resolve it.
i dont want that it fuck to any 1 else , so this may help u

static void TodayAppList(FormType* frm)
{ 
SysDBListItemType          *dbListIDsP; 
MemHandle                  dbListIDsH; 
static UInt16              dbCount = 0; 
UInt16 counter; 
Boolean                    status;                 
ListType*  lst;
static char **ItemType; 
UInt16 ListItemNum;
 
        if(ItemType)
         {
                 for(counter=0;counter<dbCount;counter++)
                        {
                                MemPtrFree(ItemType[counter]);
                        }       
                                
                        MemPtrFree(ItemType);                   
                        dbCount=0;               
                }
                   if(frm)
                   { 
                                
           status = SysCreateDataBaseList('appl', 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);
                                                 
          }  
 lst = (ListType*)FrmGetObjectPtr(frm,FrmGetObjectIndex(frm, PrefList));        
  
           LstSetListChoices (lst,ItemType,dbCount);           
           ListItemNum= LstGetSelection (lst);  
           Item= LstGetSelectionText(lst,ListItemNum);
////wat ever u like to do here
}

and when u want to free this memroy than call this fumction with

TodayAppList(0); before u close all frm in the appstop() function 
this will free all ur memory alloted in it and it wrk definately .
-- 
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to