# C1.Data.ClientScope.Release

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Data_ClientScope_Release_" data-uid="C1.Data.ClientScope.Release*">Release Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Data_ClientScope_Release_" data-uid="C1.Data.ClientScope.Release*"></a>
<h4 id="C1_Data_ClientScope_Release_System_Object_" data-uid="C1.Data.ClientScope.Release(System.Object)">Release(object)</h4>
<div class="markdown level1 summary"><p>Unmark a needed entity.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool Release(object entity)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Release(entity As Object) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></td>
      <td><span class="parametername">entity</span></td>
      <td><p>An entity that was marked as needed using <a class="xref" href="C1.Data.ClientScope.AddRef.html#C1_Data_ClientScope_AddRef_System_Object_">AddRef(object)</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if the <code class="paramref">entity</code> was unmarked; otherwise, False (the entity is not unmarked until every AddRef is balanced by a Release).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Data_ClientScope_Release_System_Object__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Calling this method does not release memory by itself. The <code class="paramref">entity</code> becomes unneeded, so it can be disposed of at cache cleanup time.</p>
</div>


<a id="C1_Data_ClientScope_Release_" data-uid="C1.Data.ClientScope.Release*"></a>
<h4 id="C1_Data_ClientScope_Release_System_Type_" data-uid="C1.Data.ClientScope.Release(System.Type)">Release(Type)</h4>
<div class="markdown level1 summary"><p>Unmark a needed entity type. Calling this method does not release memory.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool Release(Type entityType)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Release(entityType As Type) As Boolean</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.type">Type</a></td>
      <td><span class="parametername">entityType</span></td>
      <td><p>An entity type that was marked as needed using <a class="xref" href="C1.Data.ClientScope.AddRef.html#C1_Data_ClientScope_AddRef_System_Type_">AddRef(Type)</a>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><p>True if the entity type was unmarked (every Addref was balanced with Release); otherwise, False.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Data_ClientScope_Release_System_Type__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Calling this method does not release memory until cache cleanup time.</p>
</div>
</div>
