-
Notifications
You must be signed in to change notification settings - Fork 976
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
Comments
CC: @JeremyKuhne |
@pedromcrocha is there a chance you could create a small reproduction project? |
@Olina-Zhang could your team please verify? |
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! |
Hi @Olina-Zhang , i remove some references, and join a video MemoryLeak_AxHost.mp4 |
Hi @Olina-Zhang , no need do install a third-party, just follow the next video MemoryLeak_AxHost_v2.mp4 |
@pedromcrocha I believe this is ok with .NET 9 now as we don't cache object wrapped interfaces. |
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. |
.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
and if i do
this.axCoPDFXCview1.ContainingControl = null;
this.axCoPDFXCview1.Dispose();
i cannot get rid of AxHost.OleInterfaces
Steps to reproduce
The text was updated successfully, but these errors were encountered: