On Tuesday 13 June 2006 12:47, Bryan Sant wrote:
>
> C++:
>
> void no_leak() {
> MyObject obj(1, 2, 3);
> }
>
> Local variable. Allocated on the stack. Falls out of scope shortly. No
> leaks.
>
> > How do you statically allocate on the stack a more complicated object
> > that requires several parameters in the constructor?
>
> Java:
>
> void noLeak() {
> MyObject obj = new MyObject(1, 2, 3);
> }
>
> Local variable. Sometimes called an automatic variable in Java-terms.
'automatic variable' is also the correct term for the C++ case.
--
Respectfully,
Nicholas Leippe
Sales Team Automation, LLC
1335 West 1650 North, Suite C
Springville, UT 84663 +1 801.853.4090
http://www.salesteamautomation.com
/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/