OwnerReturnAttribute
Description
- Derived from
-
Attribute abstract
The OwnerReturn is used on return values of methods and properties to declare ownership of disposable objects.
The following rules depict - based on the ownership status - when a disposable object must be disposed and when disposal must not be performed. Going by these rules will avoid situations where a resource is disposed although it is still being used and situations when a resource is never explicitly disposed, thus wasting system resources.
-
When used on a method:
... [OwnerReturn] IDisposable MyObj(...) { ... } ...
The caller takes ownership of the object that is returned by the method and becomes responsible for its disposal.
-
When used on a property:
... [OwnerReturn] IDisposable MyObj { get { ... } } ...
The caller takes ownership of the object that is returned by the property and becomes responsible for its disposal.
- See also
Usages
ApplicationWindow.Create method
ApplicationWindow.CreateNull method
Bitmap.Clip method
Bitmap.HandleRenderTarget method
Bitmap.Wrap method
BlockStorage.Create method
BlockStorage.Get method
BlockStorage.New method
BlockStorage.Open method
Brush.InputCopy method
Brush.InputHeightmap method
Brush.InputImage method
Brush.InputUniform method
Brush.MaskRadial method
ByteBuffer.Allocate method
ByteBuffer.AllocateNull method
ByteBuffer.Compact method
ByteBuffer.CreatePool method
ByteBuffer.FromArray method
ByteBuffer.Raw method
ByteBuffer.ReadAsStream method
CharacterEncoding.EncodeString method
ClassType.ConfigureDelegate method
ColorBufferPyramid.For method
ColorCube.Texture2 method
ColorCube.Texture3 method
ConfiguratorBase.DoFromValue method
ConfigValue.Configure method
ConfigValueBrowser.Browse method
ConfigValueBrowser.BrowseWidget method
ConfigValueBrowser.Inspect method
ConfigValueBrowser_Tinman_AddOns.BrowseHeightmap method
ConfigValueBrowser_Tinman_AddOns.BrowseImage method
ConfigValueBrowser_Tinman_AddOns.BrowseModelReader method
ConfigValueBrowser_Tinman_AddOns.BrowsePixelPyramid method
ConfigValueBrowser_Tinman_AddOns.BrowseShape method
CsvReader.File method
CsvReader.Text method
CsvWriter.File method
CX.Mine method
DatabaseUtil.CacheObject property
DatasetCollection.DoOpen method
DatasetCollection.Lookup1 method
DatasetCollection.Lookup2 method
DatasetCollection.Open1 method
DatasetCollection.Open2 method
DatasetCollection.Open3 method
DatasetCollection.Open4 method
DatasetCollection.Open5 method
DatasetFileCache.Create method
DatasetFileCache.CreateOrOpen method
DatasetFileCache.Open method
DatasetFileCacheDelegate type
DataViewBase.DoCreateComponent method
DirectX11Context.CreateRenderTargetShared method
DirectX11Context.ForDevice method
DirectX9Context.ForDevice method
DisposableUtil.Cast method
DisposableUtil.CastOwn method
Example_Heightmap.Project method
Example_PixelPyramid.StreamFromCustomService method
Example_PixelPyramid.StreamFromWebMapService method
Example_PixelPyramid.StreamFromWebMapTileService method
Example_SceneApi.BuildFireEffect method
Example_StreamingAndCaching.OpenRemoteFile method
Example_StreamingAndCaching.UsePyramidFileCache method
Example_TextureStreaming.CreateStreamingTarget method
GeodataPipeline.BuildDataset method
GeodataPipeline.BuildDatasets method
GeodataPipeline.CollectHeightmaps method
GLBase.Create method
GLContext.FrameBufferObjectCreate method
GLContext.VertexArrayObjectCreate method
GLEffect.SamplerStateCreate1 method
GLEffect.SamplerStateCreate3 method
Grammar.ParseGrammar1 method
Grammar.ParseGrammar2 method
GrammarBuilder.Build method
GrammarBuilder.DefaultRule method
GrammarBuilder.ExternalRule method
GrammarBuilder.Psi method
Graph.Copy method
Graphics.CreateBitmap method
Graphics.CreatePrimitiveBuffer method
Graphics.LoadBitmapFrom1 method
Graphics.LoadBitmapFrom2 method
Graphics.LoadFontFrom method
GraphicsContextFactory.DoCreateGraphicsContext method
GUID.ToBuffer1 method
Heightmap.DoSplit method
Heightmap.Merge method
HeightmapBuilder.Constant method
HeightmapBuilder.Dataset1 method
HeightmapBuilder.Dataset2 method
HeightmapBuilder.Dataset3 method
HeightmapBuilder.Memory method
HeightmapBuilder.Proxy method
HeightmapBuilder.Shapes method
HeightmapGrinder.Heightmap method
HeightmapsUtil.CacheObject property
IApplicationWindowFactory.CreateApplicationWindow method
IApplicationWindowFactory.CreateRenderContext method
IApplicationWindowFactory.CurrentRenderContext method
IBinaryDigest.FinishDigestBuffer method
IBrush.Append method
IBrush.Average method
IBrush.Combine method
IBrush.Invert method
IBrush.MaskSlope method
IBrush.Merge method
IBrush.Modulate method
IBrush.OutputHeightmap method
IBrush.Prepend method
IBufferFactory.CreateIndexBuffer method
IBufferFactory.CreateIndexBufferStatic method
IBufferFactory.CreateStructuredBuffer method
IBufferFactory.CreateStructuredBufferStatic method
IBufferFactory.CreateVertexBuffer method
IBufferFactory.CreateVertexBufferStatic method
ICanvasFactory.CreateCanvas method
IConfigurator.FromField method
IConfigurator.FromScript method
IConfigurator.FromValue method
IConfigurator.FromValueArray method
IConfigurator.FromValueList method
IConfiguratorObject.FromValuePlain method
IDataModel.SubModel method
IDataStreamFactory.ToDataStream method
IDataStreamOps.Background method
IDataStreamOps.Buffer method
IDataStreamOps.ReadToEnd method
IDataStreamOps.ToFile method
IDataView.CreateComponent method
IDisposable.AcquireBase method
IDisposable.AcquireThrow method
IDisposableGeneric.Acquire method
IEndPoint.CreateServer method
IEndPoint.OpenConnection method
IFileData.OpenStream method
IFileOps.Cache method
IFileOps.Offset method
IFileOps.ReadArchive method
IFileOps.ReadOnly method
IFileSystem.FileNew method
IGeoPathReader.Vertical method
IGraphicsContext.CreateFence method
IGraphicsContext.CreateGeometryBuffer method
IGraphicsContext.CreateRenderEffect method
IGraphicsContext.CreateRenderTarget method
IGraphicsContext.CreateSwapChain method
IGraphicsContext.CreateTextureCube method
IGraphicsContext.CreateTimer method
IGraphicsContext.Graphics property
IGraphicsContextFactory.GetGraphicsContext method
IHeightmapOps.Border method
IHeightmapOps.Clip method
IHeightmapOps.ColorChannels method
IHeightmapOps.Combine method
IHeightmapOps.Merge method
IHeightmapOps.Proxy method
IHeightmapOps.Scale method
IHeightmapOps.Split method
IHeightmapOps.Swizzle method
IHeightmapOps.ToPyramid method
IHeightmapOps.TransformRange method
IHeightmapOps.UseColorRamp method
IHeightmapProvider.OpenHeightmapDataset method
IImage.ReadImage1 method
IImage.ReadImage2 method
IImage.ReadTexture method
IImageOps.Adjust method
IImageOps.AlphaToCoverage method
IImageOps.Background method
IImageOps.ChannelToIntensity method
IImageOps.Clip method
IImageOps.Crop method
IImageOps.Function method
IImageOps.IntensityToChannel1 method
IImageOps.IntensityToChannel2 method
IImageOps.Invert method
IImageOps.Op method
IImageOps.Pad method
IImageOps.Scale method
IImageOps.SetCoverage method
IImageOps.SetGamma method
IImageOps.SetGeoref method
IImageOps.SetLayer method
IImageOps.SetNoData method
IImageOps.SetRange method
IImageOps.SetValues method
IImageOps.Smooth method
IImageOps.ToCoverage method
Image.DoReadImage method
ImageFormat.DoReadImage method
ImageFormat.ReadImage method
ImageFormat.ReadTexture method
ImageFormat.WriteImage method
ImageWriter.For method
IMapProjectionOperation.Datum method
IMapProjectionOperation.Projection method
IModelTexture.ReadTexels method
IObjectPoolFactory.New method
IOperationOps.And method
IOperationOps.Then method
IPixelPyramid.Cache1 method
IPixelPyramid.Cache2 method
IPixelPyramid.ColorChannels method
IPixelPyramid.Slice method
IPixelPyramid.ToFullSize method
IPixelPyramid.ToTilePad method
IPixelPyramid.ToTileSize method
IPreloadingResourceHandle.PreloadResource method
IProjectSamplesOperation.Since method
IRenderEffectBase.DataFlow property
IRenderEffectFactory.CreateRenderEffect method
IResourceCache.OwnNull method
IResourceHandle.CreateResource method
ISceneData.ChildAdd method
ISceneData.LoadPyramid method
ISceneData.LoadRaster method
ISceneEntity.CreateView method
ISerializer.ReadObject method
IServer.Accept method
IShapeReader.Modifier method
ISimpleHttp.Get method
ITexelPyramid.Cache method
ITexelPyramid.DecodePixels method
ITextStreamFactory.ToTextStream method
ITextureFactory.CreateTexture2D method
ITextureFactory.CreateTexture2DStatic method
IVectorImageReader.Read method
IWidgetFactory.CreateWidget method
LocalFileSystem.FileTemp method
LocalFileSystem.FileTempPath method
MBTilesPyramid.Open method
MemoryDataStream.CreatePool method
MemoryDataStream.For1 method
MemoryDataStream.For2 method
MemoryDataStream.For3 method
MemoryDataStream.ToBuffer method
MemoryDataStream.Wrap method
MemoryTextStream.For1 method
MemoryTextStream.For2 method
MemoryTextStream.For3 method
MemoryTextStream.For4 method
MeshBuffer.Create method
MeshBuffer.MeshCreate method
MeshChunkBuilder.Build method
MeshChunkBuilder.BuildAndDispose method
MeshChunkBuilder.Texture1 method
MipmapLevelTexture.CreateTexture method
Model.Read1 method
Model.Read2 method
ModelFormat.DoReadModel method
ModelFormat.DoWriteModel method
ModelFormat.ReadModel method
ModelFormat.WriteModel method
ModelGeometryData.For method
ModelScanner.Scan method
ModelTexture.Dynamic method
ModelTexture.ReadTexels method
NativeWindow.Automatic method
NativeWindow.Manual method
ObjectPoolDelegate type
OpenFlightDatabase.For method
OpenFlightModelReader.Database property
Operation.Checksum method
Operation.Copy method
Operation.Delete method
Operation.Flush method
Operation.Sync method
ParticleBufferBuilder.Build method
PipelineStateStream.Build method
PipelineStateStream.SubobjectBlend method
PipelineStateStream.SubobjectDepthStencil1 method
PipelineStateStream.SubobjectRasterizer method
PixelFont.Monospaced method
PixelPyramidBuilder.Constant1 method
PixelPyramidBuilder.Constant2 method
PixelPyramidBuilder.Dataset1 method
PixelPyramidBuilder.Dataset2 method
PixelPyramidBuilder.Dataset3 method
PixelPyramidBuilder.Memory method
PixelPyramidBuilder.Shapes method
PixelPyramidGrinder.Pyramid method
ProceduralHeightmapBuilder.Build method
PyramidFileCache.Create method
PyramidFileCache.CreateOrOpen method
PyramidFileCache.Open method
PyramidsUtil.CacheObject property
RenderContext.Create method
RenderContext.Current method
RenderStage.Default method
RenderStage.For method
SceneData.New1 method
SceneData.New2 method
SceneData.New3 method
SceneDataFormat.Dataset method
SceneOptions.CreateScene method
Serializer.Deserialize1 method
Serializer.Deserialize2 method
Serializer.Deserialize3 method
Serializer.Serialize1 method
Serializer.Serialize2 method
ShapeFormat.DoReadShapes method
ShapeFormat.ReadShapes1 method
ShapeFormat.ReadShapes2 method
SimpleHttp.Create method
SingletonDelegate type
SpriteCache.Data method
SystemUtil.CreateInstance method
TableView.CreateComponent method
TerrainBufferOptions.CreateTerrainBuffer method
TerrainDecal.AsStreamingTarget method
TerrainLayerSlot.Prepare method
TerrainParameters.CreateEffect method
TexelBuffer.BufferTemp method
TexelBuffer.Convert1 method
TexelBuffer.Convert2 method
TexelBuffer.Convert3 method
TexelBuffer.FromBase85 method
TexelBuffer.ImportPixels method
TexelBuffer.ReadTXB1 method
TexelBuffer.ReadTXB2 method
TexelBuffer.ReadTXB3 method
TextureAtlasOptions.CreateTextureAtlas method
TextureData2D.For1 method
TextureData2D.For2 method
TextureFactory.DoCreateTexture2D method
TextureFormat.CreateBuffer method
TextureFormat.CreateBuffer method
TextureLayer.ExportDataset method
Thread.Create method
Thread.CreateWrap method
TinmanCoreModule.CreateSimpleHttp method
TinmanErrorDump.For1 method
TinmanErrorDump.For2 method
TinmanErrorDump.Load method
TinmanModule.Dependencies method
TinmanModule.ReadResource method
TinmanModule.ReadResourceNull method
TinmanTerrainModule.CreateSimpleHttp method
Tutorial.CreateGui method
Tutorial.LoadEndHeightmapDataset method
Tutorial.UseCacheIfWeb method
TutorialInfoBase.Build method
Tutorial_10_Tinman.CreateGravity method
Tutorial_10_Tinman.CreateHeightmap method
Tutorial_10_Tinman.CreateStructureUpdater method
Tutorial_10_Tinman.CreateVertexUpdater method
Tutorial_30_SceneViewWidget.CreateHeightmap_Earth_DEM method
Tutorial_30_SceneViewWidget.CreateHeightmap_Earth_Geoid method
Tutorial_30_SceneViewWidget.CreateHeightmap_Moon_DEM method
Tutorial_30_SceneViewWidget.CreateSceneOptions method
VertexWriter.ToBuffer method
VertexWriter.ToBytes method
Widget.Create method
Widget.CreateNull method
WidgetDialog.Build method
WidgetDialogBuilder.Build method
WidgetDialogBuilder.Button method
WidgetDialogBuilder.ButtonCancel method
WidgetDialogBuilder.ButtonNo method
WidgetDialogBuilder.ButtonOk method
WidgetDialogBuilder.ButtonYes method
WidgetDialogBuilder.Content1 method
WidgetDialogBuilder.Content2 method
WidgetDialogBuilder.Content3 method
WidgetDialogBuilder.EventDelegate method
WidgetDialogBuilder.EventListener method
WidgetDialogBuilder.Title method
WidgetDialogBuilder.UserData method