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 java-native-access#867
- Loading branch information