Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
dispose
- Page 1
Re: System.exit(0) AND this.dispose()
Programming
Software Development
14 Years Ago
by JamesCherrill
dispose
() just gets rid of a swing object. If you have two windows and
dispose
() one of them, the other will still be there. System.exit() terminates the whole program and closes all its windows.
Re: System.exit(0) AND this.dispose()
Programming
Software Development
14 Years Ago
by kudresov
dispose
frees resources used by [B]class[/B] and exit forces all threads of the program to terminate immediately, common use if you get an error in your program and what to terminate it you use System.exit(-1), -1 indicates that some error occurred, if no error occurred that would be exit(0)
Re: how to stop the closing window ...
Programming
Software Development
12 Years Ago
by mKorbel
dispose
(), really nothing for JFrame (JDialog, JOptionPane or JWindow)'s lifecycle, …
Re: how to reset the form
Programming
Software Development
14 Years Ago
by sknake
Dispose
the form and re-instantiate it to the state defined by the contructor(s). However I am almost certain this is [b]not[/b] what you want so please clarify what you are doing, and what you would like to do.
Re: How to free heap memory???
Programming
Software Development
13 Years Ago
by masijade
dispose
() after hiding. setVisisble(false) simply "hides" it, it does not "get rid of it".
Re: Kill a process?
Programming
Software Development
12 Years Ago
by Cameronsmith63
Dispose
? I had a similar problem with interops and had to force a GC.
Re: Dispose
Programming
Software Development
12 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
13 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
12 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
12 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
12 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
12 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
12 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
12 Years Ago
by skatamatic
… and unless performance or memory consumption is an issue calling .
Dispose
() will just clutter your code.
Dispose
Programming
Software Development
13 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
14 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
14 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
11 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
16 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
14 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
14 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
14 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
14 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
11 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
14 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
19 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
16 Years Ago
by eranga262154
Sorry for disturbing. Simply I can do it by diposing by calling
dispose
()
Dispose in asp.net
Programming
Software Development
14 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
14 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
14 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.
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
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
© 2024 DaniWeb® LLC