Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!caen!umich!sharkey!tygra!dave From: dave@tygra.ddmi.com (David Conrad) Newsgroups: comp.lang.c Subject: Re: alloca() portability Message-ID: <505@tygra.ddmi.com> Date: 14 Nov 90 07:23:10 GMT References: <14377@smoke.brl.mil> <9122@ncar.ucar.edu> <27537@mimsy.umd.edu> <1990Nov09.233527.7489@chinet.chi.il.us> <27608@mimsy.umd.edu> Reply-To: dave@tygra.UUCP (David Conrad) Organization: very little Lines: 23 In article paulb@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@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. <>> = E-MAIL Address: dave@ThunderCat.COM