Mandatory QObject-based memory mngment for all MediaDevice Capabilities
AFAICS, all subclasses of Handler::Capability were only created using "new" and never deleted, yielding continuous memory leaks. Make it compulsory for them to pass their parent object (relevant MediaDeviceHandler) so that they are deleted when their associated collections (and therefore handlers) disappear. Added benefit is that it is now guaranteed inside capabilities that their collection (handler) is valid throughout their lifetime. All external code that keeps references to such capabilities should do so only using QWeakPointer (all found places fixed). Apart from fixing memory leaks, this should definitely fix crash in bug 245852. Fix also MediaDeviceTrack::inCollection() so that other crashed are avoided. BUG: 245852 FIXED-IN: 2.5
parent
f718f017
Please register or sign in to comment