18 references to FreeStrategy
Microsoft.Interop.SourceGeneration (18)
Marshalling\AttributedMarshallingModelGeneratorResolver.cs (18)
178FreeStrategy freeStrategy = GetFreeStrategy(info, context);
180if (freeStrategy == FreeStrategy.FreeOriginal)
185if (freeStrategy != FreeStrategy.NoFree && marshallerData.Shape.HasFlag(MarshallerShape.Free))
190if (freeStrategy == FreeStrategy.FreeOriginal)
272var freeStrategy = GetFreeStrategy(info, context);
276if (freeStrategy == FreeStrategy.FreeOriginal)
281marshallingStrategy = new StatefulLinearCollectionMarshalling(marshallingStrategy, marshallerData.Shape, countInfo, countInfoRequiresCast, elementsMarshalling, freeStrategy != FreeStrategy.NoFree);
283if (freeStrategy == FreeStrategy.FreeOriginal)
297var freeStrategy = GetFreeStrategy(info, context);
300if (freeStrategy == FreeStrategy.FreeOriginal)
307marshallingStrategy = new StatelessLinearCollectionMarshalling(marshallingStrategy, elementsMarshalling, nativeType, marshallerData.Shape, countInfo, countInfoRequiresCast, freeStrategy != FreeStrategy.NoFree);
318if (freeStrategy != FreeStrategy.NoFree && marshallerData.Shape.HasFlag(MarshallerShape.Free))
323if (freeStrategy == FreeStrategy.FreeOriginal)
366private static FreeStrategy GetFreeStrategy(TypePositionInfo info, StubCodeContext context)
371return FreeStrategy.FreeNative;
378return FreeStrategy.FreeNative;
385return FreeStrategy.FreeOriginal;
389return FreeStrategy.NoFree;