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

MemoryLeak in AxHost #10405

Closed
pedromcrocha opened this issue Nov 30, 2023 · 10 comments
Closed

MemoryLeak in AxHost #10405

pedromcrocha opened this issue Nov 30, 2023 · 10 comments
Assignees
Labels
📭 waiting-author-feedback The team requires more information from the author tenet-performance Improve performance, flag performance regressions across core releases

Comments

@pedromcrocha
Copy link

.NET version

7.0
8.0

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

not tested

Issue description

AxHost does not dispose correctly.
is retained in ContainingControl and in private readonly AxHost _host in OleInterfaces class

with
this.axCoPDFXCview1.Dispose() //axCoPDFXCview1 my class that derive from AxHost
image

and if i do
this.axCoPDFXCview1.ContainingControl = null;
this.axCoPDFXCview1.Dispose();
image

i cannot get rid of AxHost.OleInterfaces

Steps to reproduce

@pedromcrocha pedromcrocha added the untriaged The team needs to look at this issue in the next triage label Nov 30, 2023
@elachlan elachlan added the tenet-performance Improve performance, flag performance regressions across core releases label Nov 30, 2023
@elachlan
Copy link
Contributor

elachlan commented Dec 1, 2023

CC: @JeremyKuhne

@elachlan
Copy link
Contributor

elachlan commented Dec 3, 2023

@pedromcrocha is there a chance you could create a small reproduction project?

@pedromcrocha
Copy link
Author

@elachlan
Copy link
Contributor

elachlan commented Dec 4, 2023

@Olina-Zhang could your team please verify?

@Olina-Zhang
Copy link
Member

Hi @pedromcrocha we tried to use the sample: https://github.com/pedromcrocha/MemoryLeak_AxHost you provided to reproduce it, but project is missing COM dependencies, didn't find them in our testing machine. Could you please give some guidance how to reproduce it? Thanks!

@pedromcrocha
Copy link
Author

Hi @Olina-Zhang , i remove some references, and join a video

MemoryLeak_AxHost.mp4

@Olina-Zhang
Copy link
Member

I still have some problem when building that sample, missing COM dependencies. Is it necessary to install a third-party app?
image

@pedromcrocha
Copy link
Author

Hi @Olina-Zhang , no need do install a third-party, just follow the next video

MemoryLeak_AxHost_v2.mp4

@JeremyKuhne JeremyKuhne self-assigned this Dec 7, 2023
@JeremyKuhne JeremyKuhne removed the untriaged The team needs to look at this issue in the next triage label Dec 7, 2023
@JeremyKuhne JeremyKuhne added this to the .NET 9.0 milestone Dec 7, 2023
@JeremyKuhne
Copy link
Member

@pedromcrocha I believe this is ok with .NET 9 now as we don't cache object wrapped interfaces.

@JeremyKuhne JeremyKuhne added the 📭 waiting-author-feedback The team requires more information from the author label Jul 24, 2024
@JeremyKuhne JeremyKuhne removed this from the .NET 9.0 milestone Jul 24, 2024
Copy link
Contributor

This submission has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 14 days.

It will be closed if no further activity occurs within 7 days of this comment.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
📭 waiting-author-feedback The team requires more information from the author tenet-performance Improve performance, flag performance regressions across core releases
Projects
None yet
Development

No branches or pull requests

4 participants