alloca() portability

David Conrad dave at tygra.ddmi.com
Wed Nov 14 18:23:10 AEST 1990


In article <PAULB.90Nov12131357 at hcx2.ssd.csd.harris.com> paulb at ssd.csd.harris.com (Paul Beusterien) writes:
)
)In my opinion alloca is the cleanest way to allocate memory that is needed
)for the lifetime of a single routine.   Why go to the trouble of allocating
)memory from a generic place when it can be associated with the routine
)that uses it? 
)

Okay, I'm ready to draw major flames here.  This has already been added.
In C++ the destructor of a class is automatically called when a variable
of that class goes out of scope.  The destructor can perform cleanup like
deallocating memory, etc.
 
I certainly hope I remembered my flame-retardant underwear.
--
David R. Conrad
dave at tygra.ddmi.com
Following inconveniently added by system:
-- 
=  CAT-TALK Conferencing Network, Prototype Computer Conferencing System  =
-  1-800-825-3069, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
=  as a login id.    <<Redistribution to GEnie PROHIBITED!!!>>>           =
E-MAIL Address: dave at ThunderCat.COM



More information about the Comp.lang.c mailing list