Friday, August 11, 2006

Procedure is not cleared!

I have three classes written in a single .prg file. An Asbtract class and two concrete classes.
I creates an instance of each concrete class in my test program. At the end of program, I clean up them by
loClassA = .NULL.
loClassB = .NULL.

RELEASE loClassA, loClassB

Then, I open up my .prg and try to change some code. VFP prompted me "Remove classes from memory?" Why would VFP still prompt message even though I have cleaned up? It happens for NEWOBJECT() and CREATEOBJECT(). I got to use CLEAR ALL to release it.

I did another tests again.
  1. Test 1 - Only initiate classA
  2. Test 2 - Initiate AbstractClass (ya, I know I shouldn't. It is just a test) and ClassA

Huh, VFP doesn't prompt "Remove classes from memory?"!!
I guess that VFP doesn't release abstractclass from memory if we initiate more than one concrete class which derived from same superclass. Anyway to solve it?

Update: Myron Kirby posted similar question at forum. Thank you Steven Black to provide the solution! :) It solved my problem too.