BUG: Memory Not Released Correctly

ID: Q112835

The information in this article applies to:

SYMPTOMS

When you are using a MENU command to call a screen, the user object memory is not released properly, which can cause the following error message to occur:

    Not enough memory

STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

The SYS(1016) function can be used to determine the amount of memory that FoxPro is allocating for user object memory. This function returns the amount of memory being used by objects you define. The defined objects include user-defined windows, menu bars, popups, memory variables, arrays, open tables/.DBFs, files opened with low-level file functions, and so on.

Steps to Reproduce Problem

1. Modify the EX1.PJX project. This file is located in the

   FOXPRO\GOODIES\FNDATION subdirectory.

2. Edit the EXCUST screen set.

3. Add a push button to the EXCUST screen. Call this push button MEM.

4. In the VALID clause of this push button, add the following code as a

   procedure:

      WAIT WINDOW SYS(1016)

5. Create a variable for this push button and call it ACT.

6. Rebuild the application and run it.

7. Launch the CUSTOMER screen from the Application menu.

8. Press the DOWN ARROW key about 40 times. Then choose the MEM button.

   Note the amount of memory that FoxPro has allocated for user object
   memory.

9. Repeat step 8. The amount of user object memory that FoxPro has
   allocated will increase. If step 8 is repeated several times, a "Not
   enough memory" error message will eventually occur.

Additional reference words: FoxDos 2.50 2.50a 2.50b 2.60 2.60a Memory leak NOT RELEASED errmsg err msg buglist2.50 buglist2.50a buglist2.50b buglist2.60 buglist2.60a KBCategory: kbprg kbbuglist kberrmsg KBSubcategory:

Last Reviewed: April 18, 1995