Skip to content

Need to check if there is memory leak in AMediaTrackHandler #15

Description

@BranKein
webrtc::scoped_refptr<webrtc::VideoTrackSourceInterface> CreateVideoTrackSource() {
        if (!actual_video_track_source_) {
            // Create a new ActualVideoTrackSource instance if it doesn't exist
            // TODO: check if memory leak
            actual_video_track_source_ =
                webrtc::scoped_refptr<ActualVideoTrackSource>(new webrtc::RefCountedObject<ActualVideoTrackSource>());
        }
        return actual_video_track_source_;
    }

In class AMediaTrackHandler::Impl, (src/handlers/media_track/media_track_handler.cpp) IDE says that new webrtc::RefCountedObject<ActualVideoTrackSource>() part may cause a memory leak.

We need to look closely how to use webrtc::scoped_refptr.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Type

Fields

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions