Called to clear the PropVariant's referenced and local memory. You must call Clear to avoid memory leaks.
()
| 95 | /// You must call Clear to avoid memory leaks. |
| 96 | /// </remarks> |
| 97 | public void Clear() |
| 98 | { |
| 99 | // Can't pass "this" by ref, so make a copy to call PropVariantClear with |
| 100 | PropVariant tmp = this; |
| 101 | PropVariantClear(ref tmp); |
| 102 | |
| 103 | // Since we couldn't pass "this" by ref, we need to clear the member fields manually |
| 104 | // NOTE: PropVariantClear already freed heap data for us, so we are just setting |
| 105 | // our references to null. |
| 106 | variantType = (short)VarEnum.VT_EMPTY; |
| 107 | Reserved1 = Reserved2 = Reserved3 = 0; |
| 108 | pointerValue = IntPtr.Zero; |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | [StructLayout(LayoutKind.Sequential)] |
no outgoing calls
no test coverage detected