473,324 Members | 2,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

"Dispose" question

Hi all,

Do I have to explicitly dispose all disposable objects?
For some obscure reason I see for instance brushes or graphics been
disposed, but never contextmenus and such.
Can anyone explain this?

Stefan.
Jul 21 '05 #1
1 1392

Hi Stefan,

Yes, when you finish using any object that implements the IDisposable
interface you should explicitly call Dispose. The article at the link below
explains the details.

http://www.fawcette.com/vsm/2002_12/...na/default.asp

--
Rob Windsor
G6 Consulting
Toronto, Canada
"Stefan De Schepper" <st****************@skynet.be> wrote in message
news:3f***********************@reader1.news.skynet .be...
Hi all,

Do I have to explicitly dispose all disposable objects?
For some obscure reason I see for instance brushes or graphics been
disposed, but never contextmenus and such.
Can anyone explain this?

Stefan.

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: leegold2 | last post by:
Is there a way I can "dispose" of an array. For example I need to use an array for short time in a script. After I've used that data structure I want to dispose of it to free-up resources. Is there...
14
by: Atara | last post by:
I know in C++ it is true. but what about VB .Net and its GarbageCollector ? For example, consider the following case. Does f2() needs to do any disposing code ? Public Sub f1() As...
1
by: Stefan De Schepper | last post by:
Hi all, Do I have to explicitly dispose all disposable objects? For some obscure reason I see for instance brushes or graphics been disposed, but never contextmenus and such. Can anyone explain...
5
by: Peter | last post by:
Hi I have a class which implements IDisposable, but it doesn't really use the Dispose method for cleaning up resources, it uses it for completing a calculation. Actually I think it seems...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.