.NET Framework - Generic list & dispose
Asked By =?ISO-8859-2?Q?Micha=B3_Sakowicz?=
04-Dec-07 02:53 AM
Hi,
I have quick question, I've created user control which is using
generic lists internally. Should I implement IDisposable pattern to
release memory taken by those lists, or should I leave it as it is and
let GC do its job? I'm not using any unmanaged resources.
Thanks
Michal
Application
(1)
Control
(1)
Visual
(1)
IDisposable
(1)
Dispose
(1)
GC
(1)
Sakowicz
(1)
Michał
(1)
Peter Morris replied...
I would not bother. It will be GC'd when appropriate. You could, if you
wish, clear the list from the Dispose() method on your control.
Pete
srharton replied...
It is good practice to especially if the list is large and don't forget this
is running on a memory contrained device. It is better to clear memory as
soon as possible IMO. As Peter suggested, implement the IDisposable on the
Control and in the Dispose method clear the list from there.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://simonrhart.blogspot.com
=?ISO-8859-2?Q?Micha=B3_Sakowicz?= replied...
Error in C# Designer for some forms .NET Framework Hai all, I am porting my application from Visual Studio 2003 to Visual Studio 2005.The application has windows forms, user controls and resource files.I can build the application and run the application without any errors. But when i open the designer view for the user controls in the application, i get a message 'Object reference not set to instance of an object' at System you please help me out for this problem?? C# Discussions System.Reflection.Assembly.nLoad (1) Visual Studio 2005 (1) Visual Studio (1) StackCrawlMark (1) Component (1) Control (1) AssemblyName (1) PrintManager
Search funcutionality in visual studio .NET Framework Hi guys, I have developed a small application in visual studio by using visual basic. I want to add control to enable users conduct searches on any text within the table. How can I implement this. I need help. Visual Studio Development Discussions Vblanguage (1) Guys (1) A431 (1) Hi Francis, Check the following post a431-278828789814 Thanks. Catherine Sea www.dynamsoft.com www.scmsoftwareconfigurationmanagement.com keywords: Search, funcutionality, in, visual, studio description: Hi guys, I have developed a small application in visual studio by using visual basic. I want to add control to enable users
Possible to add Web User Control to a Web Control Library? .NET Framework VB.NET, Visual Studio 2005, .NET Web Application. Having created a Web Control Library is it possible to add a Web User Control to it? I don't get the option to create a new web user control, and if I copy one from my web application it doesn't then compile. So is it possible? Is there a workaround or do
Codings not changed when a control is renamed in VS2005. .NET Framework I'm new to Visual Studio 2005. I'm creating a windows application using Visual Basic. After I added a control to a form and added some codings to the control, I want to rename the control. However, I notice that after I rename the control, the codings inside it are still using the old name. Is there a setting that
How do you get parent form with non-visual control / component? .NET Framework We have a vb6 control that performs custom resizing functionality. I've successfully converted it to .NET and it works. However, I want to take advantage of the non-visual concept in .NET that allows you to create controls for placement on the component tray This RESIZE control has no visual features so it seems a good candidate. However, this control must be able to create a reference to the parent form it resides in and class. However, if I have it inherit the System.Windows.CompoentModel.Component class (for non visual controls), this FINDFORM is not available. For the life of me, I can't find