pub fn clear(&mut self) {
        if self.is_empty() {
            return;
        }

        unsafe {
            let header = self.ptr;
            debug_assert!((*header).flags & REFERENCE_FLAG == 0);

            if (*((*header).shared.as_mut_ptr())).count.release() == 0 {
                runtime::HeapFree(runtime::GetProcessHeap(), 0, self.ptr as RawPtr);
            }
        }

        self.ptr = std::ptr::null_mut();
    }
/// Clear the contents of the string and free the memory if the last handle to the string data
Clear the contents of the string and free the memory if the last handle to the string data
Clear the contents of the string and free the memory if the last handle to the string data
pub fn clear(&mut self) {
        if self.is_empty() {
            return;
        }
        unsafe {
            let header = self.ptr;
            debug_assert!((*header).flags & REFERENCE_FLAG == 0);
            if (*((*header).shared.as_mut_ptr())).count.release() == 0 {
                runtime::HeapFree(runtime::GetProcessHeap(), 0, self.ptr as RawPtr);
            }
        }
        self.ptr = std::ptr::null_mut();
    }
pub fn clear ( & mut self ) { if self . is_empty ( ) { return ; } unsafe { let header = self . ptr ; debug_assert ! ( ( header ) flags REFERENCE_FLAG 0 ) ; if ( * ( ( * header ) . shared . as_mut_ptr ( ) ) ) . count . release ( ) == 0 { runtime :: HeapFree ( runtime :: GetProcessHeap ( ) , 0 , self . ptr as RawPtr ) ; } } self . ptr = std :: ptr :: null_mut ( ) ; }
Clear the contents of the string and free the memory if the last handle to the string data
Clear the contents of the string and free the memory if the last handle to the string data
&mut self