Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
dispose
- Page 1
Re: Dispose
Programming
Software Development
13 Years Ago
by Cameronsmith63
… the function again, I get that problem. Im using base.
Dispose
(); to close the "Configuration". If i use that… command, shouldn't it
dispose
of everything in "Configuration"? Environment.
Dispose
(); would close the whole application though…
Re: Dispose
Programming
Software Development
14 Years Ago
by apegram
… object you use implements the IDisposable interface and has a
Dispose
method, you want to be in the habit of using… by the compiler into a try/finally block that calls
Dispose
on the object. Example: [CODE] using (SaveFileDialog dialog = new SaveFileDialog…] By doing this, you will not need to explicitly call
Dispose
in your own code.
Dispose
Programming
Software Development
13 Years Ago
by Cameronsmith63
… some help with this. How long does it take to
dispose
of da and confdt? What im trying to say is… so that i can kill it everytime i need to
dispose
of it? Or do I need to force a Garbage…
Re: Dispose
Programming
Software Development
13 Years Ago
by Cameronsmith63
but I do close all of my elements with conn.Close(); conn.
Dispose
(); da.
Dispose
();. I test this with time periods and I see that it works after I wait a while when executing this, or it bombs out on my 3rd attempt at executing this...
Re: Dispose
Programming
Software Development
13 Years Ago
by Mike Askew
…[0].DefaultCellStyle.Format = "G"; conn.Close(); da.
Dispose
(); //Try that conn.
Dispose
(); //Try that } [/CODE] You may have already done…
Re: Dispose
Programming
Software Development
13 Years Ago
by Mike Askew
As a matter of good practice I would manually
dispose
of the elements after each use, not relying on a garbage collection then and should hopefully resolve the error.
Re: Dispose
Programming
Software Development
13 Years Ago
by Mike Askew
It is strange indeed, calling the .
Dispose
() method is the garbage cleaner for the two variables we call it on so it should work. Stumps me at this point tbh. Yeah could give it a shot using a .txt though you can also open and edit csv's in notepad :P?
Re: Dispose
Programming
Software Development
13 Years Ago
by skatamatic
… and unless performance or memory consumption is an issue calling .
Dispose
() will just clutter your code.
Dispose
Programming
Software Development
14 Years Ago
by bbman
…: private void function() { SaveFileDialog x = new SaveFileDialog; ... } Now, should I
dispose
of it at the end, or will it do it…
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by IdanS
…object any more, and sugesting him to
dispose
the object, you cant force the Garbage Collection…"he thinks" that its ready to
dispose
the object. Its not like in c++ that… you could
dispose
the object manually when ever that you wanted!…As for "null" you dont either
dispose
the object, the only thing that you do is…
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by sknake
…When you do: [CODE]cmd.
Dispose
();[/CODE] you are not really
dispose
the object the minute that you…object any more, and sugesting him to
dispose
the object, you cant force the Garbage …quot;he thinks" that its ready to
dispose
the object. Its not like in c++ that…As for "null" you dont either
dispose
the object, the only thing that you do…
Dispose...bleh
Programming
Software Development
12 Years Ago
by Cameronsmith63
…override void
Dispose
(bool disposing) { if (disposing && (components != null)) { components.
Dispose
(); } base.
Dispose
(disposing);… through, when it gets to components.
Dispose
(), it goes to private void TerminalStatus_SelectedIndexChanged(…
Dispose/hide the JFrame on a click-event
Programming
Software Development
17 Years Ago
by eranga262154
Hi all, I want to
dispose
a JFrame using a click-event. So I simply do … work. Do you have any idea. I just want to
dispose
all the visible JFrames. Actually I have only one JFrame… exceptions either on it. And also I just want to
dispose
, not to exit the application. Any idea?
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by sknake
….NonPublic | BindingFlags.InvokeMethod; MethodInfo mi = typeof(SqlCommand).GetMethod("
Dispose
", bf); mi.Invoke(cmd, new object[] { true });….InvokeMethod | BindingFlags.Public; MethodInfo mi = typeof(Component).GetMethod("
Dispose
", bf); mi.Invoke(cmd, null); cmd.CommandText = …
Dispose a JFrame using JPanel
Programming
Software Development
15 Years Ago
by kathmartir
I have a problem with the
dispose
method. . .I got 3 java files with a class name: ….java. All of these works good until I put the
dispose
(); method on one of the condition. All I want is… opening the PageOne.java. I thought the use of method
dispose
(); would be same as using it in JFrame. Can you…
Re: Dispose a JFrame using JPanel
Programming
Software Development
15 Years Ago
by sincerelibran
… Sincerelibran [QUOTE=kathmartir;1005922]I have a problem with the
dispose
method. . .I got 3 java files with a class name….java. All of these works good until I put the
dispose
(); method on one of the condition. All I want is… opening the PageOne.java. I thought the use of method
dispose
(); would be same as using it in JFrame. Can you…
Re: Dispose a JFrame using JPanel
Programming
Software Development
15 Years Ago
by javaAddict
… could have been simpler. First don't use the "
dispose
" method. Second you need to close the the MainPage…); } } [/CODE] It is better to call
dispose
on the PageOne: [CODE] mp.setVisible(true); this.
dispose
(); [/CODE] Because you created it locally…
Re: Dispose...bleh
Programming
Software Development
12 Years Ago
by Cameronsmith63
Okay on the form is a combobox that binds data from a DB. If I
dispose
the combobox control, in the
Dispose
Method, then the app closes properly...but do i really need to add a line of code for that? It worked fine before - lol.
Re: Dispose a JFrame using JPanel
Programming
Software Development
15 Years Ago
by FriQenstein
…figure out how to make JFrame2 hide or
dispose
when the checkbox is deselected/unchecked. I've…} else { if (evt.getStateChange() == ItemEvent.DESELECTED) { new DataDetectionFrame().
dispose
(); } } } public static void main(String args[]) { java.awt.…
dispose (); ........not working ......
Programming
Software Development
20 Years Ago
by atul
….4 gives error for not having any such method for
dispose
(); if i have button b1 on my applet it shud… function : public void actionPerformed(ActionEvent e) { if (e.getSource()==b1) {
dispose
();} }
Re: Dispose/hide the JFrame on a click-event
Programming
Software Development
17 Years Ago
by eranga262154
Sorry for disturbing. Simply I can do it by diposing by calling
dispose
()
Dispose in asp.net
Programming
Software Development
15 Years Ago
by srikanthkadem
[code] SqlCommand cmd = new SqlCommand(); cmd.
Dispose
(); System.GC.Collect(); cmd.CommandText = ""; cmd.
Dispose
(); [/code] can please explain why this code is not showing error.......
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by Ramy Mahrous
… inherits from Component Component has this implmenetation of
Dispose
[code=C#] protected virtual void
Dispose
(bool disposing) { if (disposing) { lock (this) { if…
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by Ramy Mahrous
I knew it I knew it, YOU CAN'T call disposed explicit in your code, because to
dispose
the component your should by pass bool to true and the
dispose
method which has parameter (bool) is protected which means SqlCommand itself in specific time call it.
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by srikanthkadem
… didn't get clarification. [code] SqlCommand cmd = new SqlCommand(); cmd.
Dispose
(); System.GC.Collect(); cmd.CommandText = ""; [/code] in the… i use like this. [code] SqlCommand cmd = new SqlCommand(); //cmd.
Dispose
(); //System.GC.Collect(); cmd=Null; cmd.CommandText = ""; [/code…
Re: Dispose a JFrame using JPanel
Programming
Software Development
15 Years Ago
by kathmartir
…. PageOne po = new PageOne(); mp.setVisible(false); // disposing PageOne mp.
dispose
(); //disposing PageOne mp = new MainPage(); } } public void mouseEntered(MouseEvent e…
dispose control
Programming
Software Development
14 Years Ago
by mirandaj
… of groupboxes inside this panel, I am trying to
dispose
of any groupbox that is currently in the panel, …in pnlDimensions.Controls) { // if (control.GetType() == typeof(GroupBox)) // { control.
Dispose
(); // } } } [/CODE] TIA for any help
Re: dispose (); ........not working ......
Programming
Software Development
20 Years Ago
by jwenting
what error, what button, what applet, what
dispose
method???
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by Ramy Mahrous
Yes I say it inherits from DBCommand and overrides
Dispose
method
Re: Dispose in asp.net
Programming
Software Development
15 Years Ago
by IdanS
… and you can call the GC.Collect(), and it will
dispose
everthing that you dont want. But there is a lot…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC