how to delete static variable
-
i want to knwo a way how to release a static variable ....
-
i want to knwo a way how to release a static variable ....
kalyan_2416 wrote:
i want to knwo a way how to release a static variable ....
I'm not exactly sure what you mean by "release". Do you mean you no longer want the object it references? If so, then just assing
null
to it.
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
-
i want to knwo a way how to release a static variable ....
do u mean to realease the variable when closing the program. if so there is no need cz they will be released automatically.
-
kalyan_2416 wrote:
i want to knwo a way how to release a static variable ....
I'm not exactly sure what you mean by "release". Do you mean you no longer want the object it references? If so, then just assing
null
to it.
Upcoming events: * Glasgow Geek Dinner (5th March) * Glasgow: Tell us what you want to see in 2007 My: Website | Blog | Photos
hi angus my requirement is like this there is a static variable which i assign a value to it at the start of the application. basing on that i will divert to other pages..... while i close my application i need to make the static variable to die or assign some thing to else to it so that no longer the old value exits bye
-
hi angus my requirement is like this there is a static variable which i assign a value to it at the start of the application. basing on that i will divert to other pages..... while i close my application i need to make the static variable to die or assign some thing to else to it so that no longer the old value exits bye
What type is it that it needs to be released ? If it;'s a string, it's not going to exist anymore, the app that holds it will have closed. If it's got an external handle or something, you can call Dispose on it in your main forms Close event handler.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog