PRB: Deleting VB Control Doesn't DeIete Its Code from MemoryLast reviewed: June 21, 1995Article ID: Q73808 |
The information in this article applies to:
SYMPTOMSWhen you delete a control in the Visual Basic environment, the code that you wrote for that control is not deleted, but is instead moved to the Object: (General) area for code. Some programmers may not realize that these detached (unused) procedures still exist and consume memory. The detached code is available for calling, copying, or reuse. For example, when you add a control that shares the same name as a detached procedure, the detached event procedure reassociates with that control.
RESOLUTIONIf you want to delete both the control and its associated code, you need to manually select and delete the code in each event procedure for that control in addition to deleting the control itself.
STATUSThis behavior is by design.
MORE INFORMATIONThe following example demonstrates that your code goes into the Object: (General) area after you delete the associated control (or object):
|
Additional reference words: 1.00 2.00 3.00
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |