Controller should clean up SegmentFetcher upon destruction
ASan reports leaks from the controller fetch for NLSR unit tests #4682. Because internally NLSR starts fetch, but does not receive any data back.
ASan leaks from SegmentFetcher can now be mitigated after adding stop in #4692 issue (by keeping track of fetchers and stopping them in destructor). The controller should stop and clean any fetchers when it is destructed.
Updated by Davide Pesavento over 2 years ago
This is because the SegmentFetcher destructor doesn't stop the fetcher and release its resources, and the fetcher instance keeps itself alive essentially through a cyclic
shared_ptr reference. We can "fix" the Controller as a short term solution, but it's time we stop adding more and more hacks on top of each other and fix the original design mistake instead.