when to destroy local objects w/ tail recursion ?

john43 <john43@temple.edu>
4 May 2002 14:17:30 -0400

          From comp.compilers

Related articles
when to destroy local objects w/ tail recursion ? john43@temple.edu (john43) (2002-05-04)
Re: when to destroy local objects w/ tail recursion ? joachim_d@gmx.de (Joachim Durchholz) (2002-05-08)
Re: when to destroy local objects w/ tail recursion ? journeyman@compilerguru.com (2002-05-08)
Re: when to destroy local objects w/ tail recursion ? timgspam@comcast.net (Tim G) (2002-05-08)
| List of all articles for this month |

From: john43 <john43@temple.edu>
Newsgroups: comp.compilers
Date: 4 May 2002 14:17:30 -0400
Organization: Compilers Central
Keywords: OOP, optimize, question
Posted-Date: 04 May 2002 14:17:30 EDT

Hi,


If I have local objects that require finalization (i.e., calling some
kind of destructor function), is it still reasonable to optimize tail
recursion? If so, what is a good approach?


For example, the destructor for object 'B' should be called at some
point


function: f( object A)
{
        object B; // default constructor invoked
        ...
        return f( B ); // tail recursion
}


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.