-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak in COMLateBindingObject#getStringProperty
Variants that hold strings utilize a BSTR. BSTRs are special in the sense, that they are allocated by SysAllocString and freed by SysFreeString and the memory needs to be explicitly cleared. For Variants this is handled by VariantClear. VariantClear clears the data contained in the Variant and frees that data (not the Variant itself!). The Variant structure is caller allocated and in JNA located in auto-allocated memory and does not need to be explicitly freed. This closes #867
- Loading branch information
1 parent
0f4f116
commit a67d700
Showing
2 changed files
with
6 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters