Out of curiosity, are you looking at the memory before and after the call? Where is the leak - (which heap)?
Do you see missing memory before and after this entire function is called? There could be some internal memory structures being created (due to more than one being opened) and they are not resized until you are completely done with all VfsActivity? Does it grow 16 bytes per file being opened after 1? thanks - bill "Jason Kronz" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > [EMAIL PROTECTED] (Jason Kronz) wrote in <[EMAIL PROTECTED]>: > > More information: > > I took the code below out of the loop where the directory > was already open. Just put it into a separate loop after > the directory was closed and the enumerate was finished. > The memory leak went away. So it seems one of a couple > things could be happening: > > VFS doesn't like two files open at the same time. > and or > VFS doesn't like to open a file during an enumerate. > > The problem is that VFS doesn't choke it just eats memory! > > A whole lot of leaky card utilities are comming our way :-). > > -Jason > > > > > > > >Hopefully someone at palm will see this. > > > >I'm getting a memory leak of 16bytes from the following: > > > > > > error=VFSFileOpen(volRefNum,fullpath,vfsModeRead,&fileRef); > > VFSFileClose(fileRef); > > > >I do have a directory open (using VFSFileOpen) when the code > >above is run. I imagine that may be the problem (as I've > >opened files and directories separately before). > > > >Does the VFS have a limit on the number of open files? > >Hopefully not 1! I do not get an error from the above > >code just the memory leak. > > > >I should also state the fullpath is the output from an > >VFSDirEntryEnumerate() call... > > > >Setup > > > >ROM File: PalmOS40dr5-en-vz-wca16expn.rom > >POSE: 3.0a8 > > > >CodeWarrior 6.0 with upgraded OS4.0 sdk. > > > > > >Anybody else see something like this?? > > > >-Jason > > > > > > > > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
