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

Delete resources #49

Open
SiXoS opened this issue Mar 16, 2016 · 1 comment
Open

Delete resources #49

SiXoS opened this issue Mar 16, 2016 · 1 comment

Comments

@SiXoS
Copy link
Member

SiXoS commented Mar 16, 2016

There are currently very few deletions of pointers. There should be a thorough look through of destructors and positions where resources should be deleted.

Alternatively, smart pointers should be used instead of pure pointers.

@SiXoS SiXoS added this to the First release! milestone Mar 16, 2016
@DunderRoffe
Copy link
Member

DunderRoffe commented Jul 29, 2016

I vote for using smart pointers.
Also in some cases like

bool compare(Obj* o1, Obj* o2) 

We should definitely use references instead of pointers as that eliminates the need for null checks.
By using const this also guarantees that the objects are not changed by the functions,

bool compare(const Obj &o1, const Obj &o2)

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