The rule of three is to deal with the whole Big Three, but that does not necessarily mean that you will have to define them if you do not want to. Either you provide them or forbid them. What you should not do is ignore them.
So, I only defined the destructor, but did not copy the constructor and copy operator.
Am I breaking rule three?
Yes, you are breaking the rule. The compiler will generate a copy constructor and copy assignment operator, and since you allocate memory in the constructor and release in the destructor, these copies will have incorrect semantics: they will copy pointers, and you will have two classes superimposing the same name, the Destination will not even release the old memory and just overwrite the pointer.
This is problem?
If, as you mean, you are not making copies or assigning to instances of these classes, nothing will go wrong. Nevertheless, it is better to be safe and declare (and not even interfere with the definition) the copy constructor and copy assignment operator in a private way, so you do not accidentally call them.
In C ++ 11, instead of the = delete syntax, you can use:
T(T const&) = delete; // no copy constructor T& operator=(T const&) = delete; // no copy assignment
source share