PRB: Deleting VB Control Doesn't DeIete Its Code from Memory (73808)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 1.0
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
This article was previously published under Q73808 SYMPTOMS
When 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.
RESOLUTION
If 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.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 11/18/2003 |
---|
Keywords: | kbprb KB73808 |
---|
|