Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory not being released
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00854424
Message ID:
00854820
Views:
18
>Mario,
>
>It sounds like you've a memory leak somewhere in your code but I'm not sure if INSERT INTO/APPEND MEMO are responsible.
>
>>Sergey,
>> Even with Append Memo the same thing is appening.
>>
>>Mario
Hi Sergey
this is my acutal code, I really do not have a clue on where the memory leak could be
LOCAL lcError as Character, i as Integer, lcCurDir as Character 
lcerror = ""
lcCurDir = FULLPATH(CURDIR())

SET TALK OFF
SET SAFETY OFF

CD "D:\Temp\"
CREATE TABLE BackUp (mFileName M, mFile M)

=zDir(lcError)

IF !EMPTY(lcError)
	STRTOFILE(lcError, "LogFile.log")
ENDIF
CD &lcCurDir.
USE IN SELECT("Test")
SYS(1104)
RETURN


PROCEDURE zDir(pcError as Character)
LOCAL ARRAY laDir(1)
LOCAL i as Integer
	=ADIR(laDir,'*.*',"D" )
	FOR i = 1 TO ALEN(laDir,1)
		IF laDir(i,1) # "." AND laDir(i,1) # ".." AND laDir(i,1) # "BACKUP.DBF" AND laDir(i,1) # "BACKUP.FPT"
			IF "D" $ laDir(i,5)
				INSERT INTO BackUp (mFileName, mFile) VALUES (FULLPATH(laDir(i,1)), ".D.")
				CD laDir(i,1)
				zDir(pcError)
				lcdir = laDir(i,1)
			ELSE
				IF FILE(laDir(i,1))		
					INSERT INTO BackUp (mFileName, mFile) VALUES (FULLPATH(laDir(i,1)), FILETOSTR(laDir(i,1)))
					SYS(1104)
				ELSE
					pcError = pcError + "File: " + ALLTRIM(laDir(i,1)) + " not present" + CHR(13) + CHR(10)
				ENDIF
			ENDIF
		ENDIF
	ENDFOR
	CD ..
	SYS(1104)
ENDPROC
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform