Select the product you need help with
Memory usage increases when you run a Visual Basic 2005 or Visual Basic 2008 application that creates an instance of a classArticle ID: 919481 - View products that this article applies to. On This PageSYMPTOMSConsider the following scenario:
Note You are more likely to notice this behavior when the following conditions are true:
CAUSEThis issue occurs because the Edit and Continue debugging feature in Visual Studio 2005 or in Visual Studio 2008 maintains a list of weak references to objects that have been created. If the object that has been created is a class that contains an event, these weak references are maintained for the duration of the program. This behavior increases memory usage. RESOLUTIONTo resolve this issue, use either of the following methods. Method 1: Restart the Visual Basic applicationYou can restart the Visual Basic application. When you do this, the memory is freed.Method 2: Compile the Visual Basic application in release modeYou can compile the Visual Basic application in release mode. When you run a Visual Basic application that was compiled in release mode, memory usage does not increase when you create an instance of a class that contains an event.MORE INFORMATIONSteps to reproduce the issue
PropertiesArticle ID: 919481 - Last Review: March 27, 2009 - Revision: 2.0 APPLIES TO
|


Back to the top








