Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-Ctor/Assignment-Op of libember Types missing/erroneous #44

Open
simongysi-lawo opened this issue Mar 27, 2016 · 0 comments
Open

Copy-Ctor/Assignment-Op of libember Types missing/erroneous #44

simongysi-lawo opened this issue Mar 27, 2016 · 0 comments

Comments

@simongysi-lawo
Copy link
Contributor

A proper implementation of the copy constructor and/or assignment operator of many classes of libember is missing. Futhermore, most of the classes are deriving from libember::dom::Node and offers thereby the virtual clone() method. This method is not properly overriden at many places.

Beside lacking the feature to copy an Ember+ tree, it's erroneous and causes runtime problems (memory leaks, double delete, wrong parent relationship...). Either implement the copy constructor and assignment operator correctly of these types or pohibite copy/assignment.

I strongly recommend to implement them, because there are use cases for it, like implementing a proxy which forwards Ember+ messages - right now, cloning messages is an extra task, which has be done outside the library. This causes major maintainability troubles.

Examples of wrong copy constructor / assignment operator are found in nearly every Glow type, e. g. libember::glow::GlowNode (and the whole hierarchy upwards).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants