-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add a function to free allocated memory #52
Conversation
This is a subset of #15. It doesn't solves the interning of strings, only exposes |
there's some complexity in COpentimelineIO about the memory management of retained objects and retained objects in containers. I'm slightly worried that if we expose something named "free" people might get excited and think that they can use to more easily manage retained COTIO objects, which isn't the case. I'm thinking naming and documentation would help. Could you maybe in this thread, explain who is going to call the wrapped free and what they are going to be freeing? |
Apologies for the delay. This is for managed runtimes like C# who can write all the bindings as managed code. |
I see, that makes sense. Two questions (1) can you run (2) My gut feeling is that maybe it's time to move ahead with the pattern in #15. Would that allow for anything interesting in your C# bindings, in terms of easier management of strings or whatever? |
Managed runtimes like C# P/Invoke requires this in order to be able to correctly free memory in managed code that was allocated by unmanaged code. The method was only defined in copentime because it can be used on it's own but opentimlineio must be used with opentime. Signed-off-by: Félix Bourbonnais <[email protected]>
014f404
to
5787504
Compare
It would make this PR obsolete, which is a good thing edit: if the |
Cool, thanks! |
Managed runtimes like C# P/Invoke requires this in order to be able to correctly free memory in managed code that was allocated by unmanaged code.
The method was only defined in copentime because it can be used on it's own but opentimlineio must be used with opentime.