Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Struct ReferenceContext<T>

    ReferenceContext<T> holds a reference instance and ensures it is properly de-referenced from its corresponding ReferenceManager<G> when Dispose() is called. This struct is intended to be used with a using block to simplify releasing a reference such as a SearcherManager instance.

    LUCENENET specific
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public ref struct ReferenceContext<T> where T : class
    Type Parameters
    Name Description
    T

    The reference type.

    Properties

    Reference

    The reference acquired from the ReferenceManager<G>.

    Declaration
    public readonly T Reference { get; }
    Property Value
    Type Description
    T

    Methods

    Dispose()

    Ensures the reference is properly de-referenced from its ReferenceManager<G>. After this call, Reference will be null.

    Declaration
    public void Dispose()
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.