Repository navigation
Fix memleak in RenderLocationIndicatorLayer - #16404
Conversation
|
|
||
| bool contextDestroyed = false; | ||
| RenderLocationIndicatorImpl *renderImpl = nullptr; | ||
| std::unique_ptr<RenderLocationIndicatorImpl> renderImpl; |
There was a problem hiding this comment.
how this RenderLocationIndicatorImpl instance was managed before? was it leaking?
There was a problem hiding this comment.
it was probably leaking, yes..
There was a problem hiding this comment.
Curious how the CI did not detected this. It should have been visible on the Valgrind bot (but at the moment it is not failing). Also clang-tidy has a check for not using new like this that is currently disabled.
pozdnyakov
left a comment
There was a problem hiding this comment.
Could you rephrase the PR title to smth like "Fix memory leak at.."?
ivovandongen
left a comment
There was a problem hiding this comment.
@galinelle Would you also consider changing the raw new to make_unique here? https://github.com/mapbox/mapbox-gl-native/blob/galinelle_locationIndicatorPointer/src/mbgl/renderer/layers/render_location_indicator_layer.cpp#L712
c5f5f84 to
9184507
Compare
9184507 to
13ad403
Compare
Launch Checklist