473,411 Members | 1,918 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,411 software developers and data experts.

Few difficult for me questions about Dispose()

Hi

I have few questions which I would like to ask:

1. When would I place my own code to Form1 : Form method
2. When would I create Dispose method by implementing IDispose - what
is the example scenario. If so, why is better than doing something
different / simpler

What I am trying to understand is the reason for IDisposable
interface. Does implementing this interface really introduces
benefits?
When I work with the data I never really use Dispose - maybe should I
in some cases?

Best Regards
Piotr Kołodziej
Feb 9 '08 #1
1 1199
Tom
I certainly can relate to your questions!!

I posted recently on similar topic and got some wonderful replies from
some of the many gurus who frequent here. Their explanations were of
great help to me. I suggest reading the following thread because I
can't explain it any better than those who helped me out.

FileStream.Close() & GarbageCollection - Memory Leak Question

The above topic was posted on 2/4/08.

I hope it helps. :)

-- Tom

On Sat, 9 Feb 2008 07:08:09 -0800 (PST), Piotrekk
<Pi*************@gmail.comwrote:
>Hi

I have few questions which I would like to ask:

1. When would I place my own code to Form1 : Form method
2. When would I create Dispose method by implementing IDispose - what
is the example scenario. If so, why is better than doing something
different / simpler

What I am trying to understand is the reason for IDisposable
interface. Does implementing this interface really introduces
benefits?
When I work with the data I never really use Dispose - maybe should I
in some cases?

Best Regards
Piotr Kołodziej
Feb 9 '08 #2

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

Similar topics

4
by: Chuck Ritzke | last post by:
I keep asking myself this question as I write class modules. What's the best/smartest/most efficient way to send a large object back and forth to a class module? For example, say I have a data...
1
by: p988 | last post by:
What is the purpose of Trace.AutoFlush in a window form app? In a window form app, why needed calling "InitializaComponent()"? What're accomplished by such call? Other questions are related...
11
by: pradeep_TP | last post by:
Hi all, I have a few questions that I have been wanting to ask for long. These are all related to ADO.net and specifically to conenction to database. 1) If I have opened a connection to a...
9
by: Patrick.O.Ige | last post by:
I have a code below and its a PIE & BAR CHART. The values now are all static but I want to be able to pull the values from a database. Can you guys give me some ideas to do this? Thanks ...
3
by: Lance | last post by:
I have a couple of dispose questions. 1. Is it advantageous to dispose Drawing.Graphics.Clip before setting a new clip region? Here is an example: Dim rect As New Drawing.Rectangle(10, 10,...
6
by: Teresa | last post by:
1) If I do want to keep an object alive throughout the live of an application, how can I ensure that the GC doesn't clean it up? 2a) How do I determine if an object is a managed or an unmanged...
1
by: TBK | last post by:
I'm trying to finish up an assignment I had for a class and basically I'm stuck. The program is supposed to take information you've entered, put it into an array, display it in a listbox and then...
3
by: TheSteph | last post by:
Hi, In the example below, do I have to call Dispose for the 2 ImageList ? Do I have to do it in the Form.Disposed event ? public class FRM_NavBrowseConfig : Form { //... private ImageList...
4
by: Nemisis | last post by:
Hi everyone, I have 2 classes, Company and Contact, a company can have 1 or more contacts. A contact can only be in one company. I have created a Company class object that contains all the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.