Closed BryanStuurman closed 2 years ago
Inside set_tcp_load() makes a call to compare_version() with a new: if (compare_version(version_number, new int[3]{ 0, 2, 0 })) { https://github.com/xArm-Developer/xArm-CPLUS-SDK/blob/master/src/xarm/wrapper/xarm_params.cc#L59
if (compare_version(version_number, new int[3]{ 0, 2, 0 })) {
In my understanding, the pointer returned by new is lost when the function returns, however the memory remains allocated until delete can be called on that pointer (new is not affected by scope) - this would be a memory leak.
@BryanStuurman thanks for reminding.
Looks good, thanks! a closing note: code that subrepos this SDK should probably be updated to point to this most recent commit as well.
Inside set_tcp_load() makes a call to compare_version() with a new:
if (compare_version(version_number, new int[3]{ 0, 2, 0 })) {
https://github.com/xArm-Developer/xArm-CPLUS-SDK/blob/master/src/xarm/wrapper/xarm_params.cc#L59In my understanding, the pointer returned by new is lost when the function returns, however the memory remains allocated until delete can be called on that pointer (new is not affected by scope) - this would be a memory leak.