17 references to CleanupCallerAllocated
Microsoft.Interop.SourceGeneration (17)
GeneratedStatements.cs (2)
42CleanupCallerAllocated = GenerateStatementsForStubContext(marshallers, context with { CurrentStage = StubIdentifierContext.Stage.CleanupCallerAllocated }), 186StubIdentifierContext.Stage.CleanupCallerAllocated => "Perform cleanup of caller allocated resources.",
Marshalling\CustomTypeMarshallingGenerator.cs (1)
80case StubIdentifierContext.Stage.CleanupCallerAllocated:
Marshalling\ElementsMarshalling.cs (1)
454stagesToGenerate = [StubIdentifierContext.Stage.Marshal, StubIdentifierContext.Stage.PinnedMarshal, StubIdentifierContext.Stage.CleanupCallerAllocated, StubIdentifierContext.Stage.CleanupCalleeAllocated];
Marshalling\MarshallerHelpers.cs (3)
332return StubIdentifierContext.Stage.CleanupCallerAllocated; 337MarshalDirection.ManagedToUnmanaged => StubIdentifierContext.Stage.CleanupCallerAllocated, 338MarshalDirection.Bidirectional => StubIdentifierContext.Stage.CleanupCallerAllocated,
Marshalling\StatefulMarshallingStrategy.cs (2)
27if (MarshallerHelpers.GetCleanupStage(info, stubContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated) 481if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated)
Marshalling\StatelessMarshallingStrategy.cs (4)
259if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated) 319if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated) 607if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated) 640if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.CleanupCallerAllocated)
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (4)
80/// in the <see cref="StubIdentifierContext.Stage.CleanupCallerAllocated"/> stage. 94if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.CleanupCallerAllocated) 134/// Useful in scenarios where the value is always owned in all code-paths that reach the <see cref="StubIdentifierContext.Stage.CleanupCallerAllocated"/> stage, so additional ownership tracking is extraneous. 156if (context.CurrentStage == StubIdentifierContext.Stage.CleanupCallerAllocated)