A copy constructor should only be creating a new object from the data members of another, not deallocating anything. You don't need seperate methods to release memory because that's what the delete keyword is for.
in the ctor you'd do something like
Code:
SomeClass(const SomeClass& other)
{
member1 = other.member1;
member2 = other.member2;
//...etc, etc
}
There is no returning of a value. More importantly a copy constructor should properly handle the copying of member pointers. So if other has a pointer to some other object, then the SomeClass copy constructor should construct a new object with that data as well, not just point to the object, because during clean-up, you will delete one reference while the other class is left with a pointer to garbage.
Code:
SomeClass(const SomeClass& other)
{
//allocating a pointer member
p_OtherClass = new Otherclass(*(other.p_OtherClass));
//.....
}