virango / Toaster

Editor and remote control for Kemper profiling amplifier
23 stars 6 forks source link

Fix some memoryleaks #18

Closed jsharpe closed 7 years ago

jsharpe commented 7 years ago

Fixes a number of memoryleaks

Removes some dynamic allocations in favour of just storing an instance in the class. Allocated objects are stored into unique_ptr's to automatically delete them when they go out of scope or are reassigned.

jsharpe commented 7 years ago

std::map in C++11 only requires it's elements to be movable and not copyable whereas QMap requires copyable elements only. unique_ptr is only movable and can't be copied hence the change.