17 references to CleanupCallerAllocated
Microsoft.Interop.SourceGeneration (17)
GeneratedStatements.cs (2)
42
CleanupCallerAllocated = GenerateStatementsForStubContext(marshallers, context with { CurrentStage = StubIdentifierContext.Stage.
CleanupCallerAllocated
}),
186
StubIdentifierContext.Stage.
CleanupCallerAllocated
=> "Perform cleanup of caller allocated resources.",
Marshalling\CustomTypeMarshallingGenerator.cs (1)
80
case StubIdentifierContext.Stage.
CleanupCallerAllocated
:
Marshalling\ElementsMarshalling.cs (1)
454
stagesToGenerate = [StubIdentifierContext.Stage.Marshal, StubIdentifierContext.Stage.PinnedMarshal, StubIdentifierContext.Stage.
CleanupCallerAllocated
, StubIdentifierContext.Stage.CleanupCalleeAllocated];
Marshalling\MarshallerHelpers.cs (3)
332
return StubIdentifierContext.Stage.
CleanupCallerAllocated
;
337
MarshalDirection.ManagedToUnmanaged => StubIdentifierContext.Stage.
CleanupCallerAllocated
,
338
MarshalDirection.Bidirectional => StubIdentifierContext.Stage.
CleanupCallerAllocated
,
Marshalling\StatefulMarshallingStrategy.cs (2)
27
if (MarshallerHelpers.GetCleanupStage(info, stubContext) is not StubIdentifierContext.Stage.
CleanupCallerAllocated
)
481
if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.
CleanupCallerAllocated
)
Marshalling\StatelessMarshallingStrategy.cs (4)
259
if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.
CleanupCallerAllocated
)
319
if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is not StubIdentifierContext.Stage.
CleanupCallerAllocated
)
607
if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.
CleanupCallerAllocated
)
640
if (MarshallerHelpers.GetCleanupStage(TypeInfo, CodeContext) is StubIdentifierContext.Stage.
CleanupCallerAllocated
)
Marshalling\UnmanagedToManagedOwnershipTrackingStrategy.cs (4)
80
/// in the <see cref="StubIdentifierContext.Stage.
CleanupCallerAllocated
"/> stage.
94
if (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.
156
if (context.CurrentStage == StubIdentifierContext.Stage.
CleanupCallerAllocated
)