-
Notifications
You must be signed in to change notification settings - Fork 240
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
[MediaContent] Wrong Implement of Dispose pattern #70
Comments
Of course, this object always uses Dispose, so there is no real problem. |
You mean the problem is when the disposing value is false. Right? |
Yes, the disposing value was false when disposed by finalizer and in this case _handle was not released |
Has been fixed by #81. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TizenFX/src/Tizen.Content.MediaContent/Tizen.Content.MediaContent/ObjectKeeper.cs
Lines 52 to 63 in 3566375
_handle should be always freed.
https://msdn.microsoft.com/ko-kr/library/system.runtime.interopservices.gchandle(v=vs.110).aspx
When the handle goes out of scope you must explicitly release it by calling the M:System.Runtime.InteropServices.GCHandle.Free method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it.
The text was updated successfully, but these errors were encountered: