Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching to another APP version
Message
From
03/05/2018 10:08:48
 
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01659712
Message ID:
01659713
Views:
50
As a first step I'd add in each of the suspect classes in .init and .destroy a log line describing the path/source/program used to create it.
Reading this log should point you to possible culprits - often accompanied by facepalm moments ;-)
Similar reasoning to add who_am_i code to the apps/exe used in set proc, to be called as do who_am_i in ...



>Hi All,
>
>We have an application that uses a series of APPs that match the version of the dataset. E.g. a dataset is version 23, then SET('PATH') and SET('PROC') will point to a subfolder with version 23 of the application. When switching to another dataset (e.g. to 24), the switch to the apps of 24 is also made. The routine that does the switch does several things to get rid of stuff in memory.
>
>The application processes a list of datasets. Each dataset can be of a certain version (not all datasets are converted in a big-bang to the latest version of the application).
>
>This routine worked well for many years, but now there is one instance that the application continues to use the APP of the previously processed dataset. (It is an APP that contains a class created with createobject(). In the closing section the object variable is released.)
>
>What should I also release, clear or sys()? Btw, sys(1104) didn't help.
>
>
>*	This routine ensures that tcslib, techlib and userlog are specific for the version of the data.
>*	Returns whether or not the required version is supported. Can be either an existing 
>*	version or a missing.
>*	If the new version is not supported, it will retain the previous settings.
>FUNCTION switchMPSLibs( tcToPath )
>	local lcToPath, llOK, lcMPSAppPath
>
>	lcToPath = m.tcToPath
>	
>	if vartype( m.glLoggingEnabled ) = 'L' and m.glLoggingEnabled
>		*
>		if vartype( m.goUserlog ) = 'O'
>			goUserlog = NULL
>		endif
>	endif
>
>	lcMPSAppPath = m.gcMPSAppsDir + m.lcToPath
>
>	llOK      = file( m.lcMPSAppPath + '\techlib.app' )
>
>	if m.llOK
>
>		if not ( m.gcCurrentMPSVersion == m.lcToPath )
>	
>			gcCurrentMPSVersion = m.lcToPath
>			*
>			if atc( 'techlib.app', set( 'proc' ) ) > 0
>				release procedure techlib.app
>			endif
>
>			if atc( 'tcslib.app', set( 'proc' ) ) > 0
>				release procedure tcslib.app
>			endif
>			
>			if atc( 'versionlib.app', set( 'proc' ) ) > 0
>				release procedure versionlib.app
>			endif
>
>			if atc( 'mps.exe', set( 'proc' ) ) > 0
>				release procedure mps.exe
>			endif
>
>			removePaths( m.gcMPSAppsDir )		&& removes e.g. 'mpsapps\23'
>			
>			clear program
>
>			P_APPDIR = addbs( m.lcMPSAppPath )		&& might be used in tcslib, etc.
>			
>			set path to ( m.lcMPSAppPath )  additive
>
>			set procedure to mps.exe        additive
>			set procedure to tcslib.app     additive
>			set procedure to techlib.app    additive
>			set procedure to versionlib.app additive	&& however, will be the one in the main folder
>
>			InitVersionLib()							&& will further set up the lib
>		endif
>
>		glLoggingEnabled = file( 'userlog.app' )
>		*
>		if not m.glLoggingEnabled
>			goUserLog = NULL
>		endif
>	endif
>	
>	RETURN m.llOK
>
Previous
Reply
Map
View

Click here to load this message in the networking platform