S
SpreadTooThin
I have a class
class myImage: public std::list<myObject>
{
private:
std::string myImageName;
unsigned long size;
public:
myImage(void);
myImage & operator=(const myImage &i);
myImage(const myImage &i);
~myImage(void);
// There is no public data.
// A bunch of methods...
};
My question is:
as there is no use of 'new' is there anything that needs be done in
the
assignment operator, copy constructor and destructor?
specifically... the std::list<myObject> that this class is deriving
from...
Is there any point in defining these three in this class?
Shouldn't the list of objects, the name and size be copied and
destroyed automatically?
class myImage: public std::list<myObject>
{
private:
std::string myImageName;
unsigned long size;
public:
myImage(void);
myImage & operator=(const myImage &i);
myImage(const myImage &i);
~myImage(void);
// There is no public data.
// A bunch of methods...
};
My question is:
as there is no use of 'new' is there anything that needs be done in
the
assignment operator, copy constructor and destructor?
specifically... the std::list<myObject> that this class is deriving
from...
Is there any point in defining these three in this class?
Shouldn't the list of objects, the name and size be copied and
destroyed automatically?