MCPcopy Create free account
hub / github.com/microsoft/go-winio / NewWString

Function NewWString

internal/stringbuffer/wstring.go:48–52  ·  view source on GitHub ↗

NewWString returns a [WString] allocated from a shared pool with an initial capacity of at least [MinWStringCap]. Since the buffer may have been previously used, its contents are not guaranteed to be empty. The buffer should be freed via [WString.Free]

()

Source from the content-addressed store, hash-verified

46//
47// The buffer should be freed via [WString.Free]
48func NewWString() *WString {
49 return &WString{
50 b: newBuffer(),
51 }
52}
53
54func (b *WString) Free() {
55 if b.empty() {

Callers 4

GetFileSystemTypeFunction · 0.92
GetFinalPathNameByHandleFunction · 0.92
Test_BufferCapacityFunction · 0.85
Test_BufferFreeFunction · 0.85

Calls 1

newBufferFunction · 0.85

Tested by 2

Test_BufferCapacityFunction · 0.68
Test_BufferFreeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…