Frees a BSTR using the COM tp://go.microsoft.com/fwlink/?LinkID=148633 function.
Like Marshal.FreeCoTaskMem(IntPtr) and Marshal.FreeHGlobal(IntPtr), you can use this method to deallocate memory. Marshal.FreeBSTR(IntPtr) calls the COM tp://go.microsoft.com/fwlink/?LinkID=148633 function, which frees memory allocated by any of the following unmanaged methods: SysAllocString, SysAllocStringByteLen, SysAllocStringLen, SysReAllocString, SysReAllocStringLen. You can call unmanaged methods such as these with platform invoke. For details, see [<topic://cpconconsumingunmanageddllfunctions>].