ArcObjects Library Reference (Server)  

IServerContext.ReleaseContext Method

Release the server context back to the server so it can be used by another client (if pooled), or so it can be destroyed (if non-pooled).

[Visual Basic .NET]
Public Sub ReleaseContext ( _
)
[C#]
public void ReleaseContext (
);
[C++]
HRESULT ReleaseContext(
void
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

When your application is finished working with a server context, it must release it back to the server by calling the ReleaseContext method. If you allow the context to go out of scope without explicitly releasing it, it will remain in use and unavailable to other applications until it is garbage collected. Once a context is released, the application can no longer make use of any objects in that context. This includes both objects that you may have obtained from the context or objects that you created in the context.

See Also

IServerContext Interface

.NET Samples

Closest facility application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ClosestFacility_GISServerAPIClass) | Route application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: Route_GISServerAPIClass) | Service area application using the NAServer extension in ArcGIS Server via a GIS server (Code Files: ServiceArea_GISServerAPIClass) | Simple SOE (Code Files: Form1) |

.NET Related Topics

Connecting to a GIS server | Feature services | GeoData services | Managing application state | Map services | Pooling objects with server objects | Programming with server objects | Server | Working with server contexts |