Skip to content

Removed occurrences of new/delete in the code.

Jonathan Hanks requested to merge jonathan-hanks/nds2-client:make_unique into master

Remove calls to new/delete, to make memory management safer.

There are two now instances of new in the libndscxx code. Both are implementations of make_unique for use in C++11 code. One in the NDS::detail::make_unique and one in the the test code for another make_unique function.

Reworked the delayed gap handlers to be returned as unique_ptrs. Instead of raw pointers.

Changed all:

shared_ptr thing = shared_ptr(new thingy);

to

shared_ptr thing = NDS::detail::make_unique();

Fixes #66 (closed)

Merge request reports

Loading