delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/12/20:06:18

Date: Thu, 12 Jun 1997 19:07:11 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: djgpp <djgpp AT delorie DOT com>
Subject: C++ question.
Message-ID: <Pine.SUN.3.95.970612190322.19176B-100000@ernie.eecs.uic.edu>
MIME-Version: 1.0

I have a question regarding c++. Maybe it's not a good one for this group,
but I use DJGPP so what the hell. 
Let's say a class called object, and a global variable of that class. In
one of my functions I say
my_obj = Object(..something...);
This function is called a lot of times in my program, and my question is:
will the constructor generate a new copy of this object each time I call
it. And if it does will the memory previously taken by my_obj be freed?
Thank you.

Andrew Deren
aderen AT eecs DOT uic DOT edu
http://www.geocities.com/SiliconValley/Vista/1042
Look at the home page for three of my games.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019