Fastream Technologies wrote:
> FYI, this is the code:
> 
>  RAMFileCacheIndex->OnList = CacheTreeOnListForRAM;
>  RAMFileCacheIndex->ListTree();
> 
>  for(int i = RAMFileCacheIndexList->Count - 1; i >= 0; --i)
>  
> deleteFileFromRAMCacheWRTIndex((RAMFileCache*)RAMFileCacheIndexList->Items[i],
> false); (basically deletes the data 
> 
>  RAMFileCacheIndexList->Clear();
> ...
> 
> void __fastcall ProxyCache::CacheTreeOnListForRAM(TObject *Sender,
> const 
> String Key, TDateTime TimeStamp, Pointer Data, int Len, TDateTime
> Expires, 
> bool &Cancel)
> {
> RAMFileCacheIndexList->Add(Data);
> }
> //---------------------------------------------------------------------------

If you do not override DoListNode you have to use a TStringList in
CacheTreeOnListForRAM and add the key.
After ListTree() call RemoveKey() on each list item, and of course
you should have OnFreeData assigned and free your Data there, be it
objects or other pointers to allocated memory.
 
-- 
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to