Microsoft KB Archive/192960

= PRB: Cannot Release Procedure's FXP if Class Definition in PRG =

Article ID: 192960

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q192960



SYMPTOMS
In a program file, when using the SET PROCEDURE TO command to call a procedure file that has a Class Definition in it, issuing a RELEASE PROCEDURE command in the program file will not release the procedure's FXP file even after the program has been run. If the procedure file does not have any Class Definition in it, RELEASE PROCEDURE will work as expected.



RESOLUTION
Use the CLEAR ALL command to release the procedure's FXP file.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
  Create a program file named mytest containing following code: FUNCTION TestFunction

o=CREATEOBJECT("cTemp") o.SomeMethod

RETURN

DEFINE CLASS cTemp AS Custom

FUNCTION SomeMethod(lcText) lcText=IIF(type("lcText")="C",lcText,"HelloWorld") WAIT WINDOW lcText RETURN

ENDDEFINE   In the Command window, run the following commands: CLEAR ALL CLOSE ALL CLEAR PROG

SET PROCEDURE TO mytest ?SET("PROCEDURE")    && The name of the procedure file returned DO TestFunction

RELEASE PROCEDURE mytest ?SET("PROCEDURE")    && Nothing returned  Go to Explorer and find mytest.fxp and try to delete the file. Note that the FXP file cannot be deleted, yet you cannot access either the function in the PRG or the class.

Additional query words: kbDSupport kbDse kbVFp300b kbVFp500a kbVFp500 kbVFp600 kbXBase

Keywords: kbprb KB192960

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.