cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
How to delete automatically created vari
How to delete automatically created variable, array, etc.?
Apr 2, 2011 at 5:21pm UTC
delpins
(7)
When I initialize some automatic object, how I can delete it from stack? I know that compiler takes care of that, but sometimes I want to free memory from unused variables when I want.
Apr 2, 2011 at 5:47pm UTC
wasabi
(207)
What do you mean by automatic object?
This?
int
i=1;
?
Well, you can't. Or, well, you could create a scope and place that variable in it, but I don't see why you'd want to do that.
Apr 2, 2011 at 5:54pm UTC
delpins
(7)
Ok, thanks for help!
Topic archived. No new replies allowed.