I\'m trying to gain some memory saving in a C++ program and I want to know if I can use blocks as a scope for variables (as in Perl). Let\'s say I have a huge
Yes, you can.
The destructor will be called as soon as the variable falls out of scope and it should release the heap-allocated memory.