Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak #477

Closed
xdcsystems opened this issue May 30, 2024 · 3 comments
Closed

Memory leak #477

xdcsystems opened this issue May 30, 2024 · 3 comments

Comments

@xdcsystems
Copy link
Contributor

Hello,

QAVSubtitleFrame::QAVSubtitleFrame()
: QAVStreamFrame(*new QAVSubtitleFramePrivate)
{
Q_D(QAVSubtitleFrame);
d->subtitle.reset(new AVSubtitle, subtitle_free);
memset(d->subtitle.data(), 0, sizeof(*d->subtitle.data()));
}

Asan tell me - new AVSubtitle - not free

Propousal:

static void subtitle_free(AVSubtitle *subtitle)
{
avsubtitle_free(subtitle);
delete subtitle;
}

Leak very fast, ~8Gb around 2 minutes

Thanks

@valbok
Copy link
Owner

valbok commented May 30, 2024

thanks,

looks delete subtitle; is missing, right.

Could you please add MR and will be merged you as author?
Also did you try ASAN with that fix?

@valbok
Copy link
Owner

valbok commented Jun 1, 2024

#479

@valbok valbok closed this as completed Jun 1, 2024
@xdcsystems
Copy link
Contributor Author

thanks,

looks delete subtitle; is missing, right.

Could you please add MR and will be merged you as author? Also did you try ASAN with that fix?

Hi!

Sorry for the long time answer - a lot of work and little time :)
I do not claim authorship, thank you for making the merge yourself.
You have a good project, I wanted to help.

Yes, after this correction the asan says that everything is fine.
Well, at least not bad ).

There are still leaks, but they are minor and, in my opinion, not worth attention.
At least for now.

Thank you for your work and project.
I was glad to help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants