|
-
Dec 20th, 2003, 03:44 PM
#1
Thread Starter
Registered User
restart application
what is the simplest way to restart my application and clear all variables from ram?
thanks.
-
Dec 20th, 2003, 03:47 PM
#2
Start another instance and close the first one
-
Dec 20th, 2003, 04:02 PM
#3
Thread Starter
Registered User
how?
do you have some code?
-
Dec 20th, 2003, 04:21 PM
#4
Originally posted by marvinklein
how?
do you have some code?
.....
System.Process.Start("MyProgram.exe")
me.close()
It may not be the most efficient way (since it loads a copy of the program, then the other closes), but it is the easyest.
-
Dec 20th, 2003, 04:55 PM
#5
Thread Starter
Registered User
Originally posted by kasracer
.....
System.Process.Start("MyProgram.exe")
me.close()
It may not be the most efficient way (since it loads a copy of the program, then the other closes), but it is the easyest.
anybody have some ideas on the most efficient way of doing this?
-
Dec 20th, 2003, 09:38 PM
#6
Member
If what you want is only to free up more resources, you can call GC.Collect() function to request the garbage collection to free up all unused resources. This way you can re-gain resources without restarting your application.
-
Dec 20th, 2003, 10:38 PM
#7
Sleep mode
Originally posted by Volvere
If what you want is only to free up more resources, you can call GC.Collect() function to request the garbage collection to free up all unused resources. This way you can re-gain resources without restarting your application.
Before this ,
add all your class level variables in destructors(or Dispose() method and call it when you're done of your obj class) and they will be disposed when that instance of the object is no longer used . This is the most efficient way plus explicitly calling GC .
-
Dec 21st, 2003, 02:52 PM
#8
Thread Starter
Registered User
Originally posted by Pirate
add all your class level variables in destructors(or Dispose() method and call it when you're done of your obj class) and they will be disposed when that instance of the object is no longer used . This is the most efficient way plus explicitly calling GC .
how do you destruct variables or classes?
i know you can do myform.unload...
but how do you dispose arrays or things like that?
on a different, (maybe related??)
also, there is a standard function in classes New()
i know how to use that.
but what does the function finalize() do?
-
Dec 21st, 2003, 03:02 PM
#9
Sleep mode
-
Dec 21st, 2003, 03:10 PM
#10
Thread Starter
Registered User
thanks pirate. that's really helpful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|