[]
        
(Showing Draft Content)

C1.Data.ClientScope.Release

Release Method

Release(object)

Unmark a needed entity.

Declaration
public bool Release(object entity)
Parameters
Type Name Description
object entity

An entity that was marked as needed using AddRef(object).

Returns
Type Description
bool

True if the entity was unmarked; otherwise, False (the entity is not unmarked until every AddRef is balanced by a Release).

Remarks

Calling this method does not release memory by itself. The entity becomes unneeded, so it can be disposed of at cache cleanup time.

Release(Type)

Unmark a needed entity type. Calling this method does not release memory.

Declaration
public bool Release(Type entityType)
Parameters
Type Name Description
Type entityType

An entity type that was marked as needed using AddRef(Type).

Returns
Type Description
bool

True if the entity type was unmarked (every Addref was balanced with Release); otherwise, False.

Remarks

Calling this method does not release memory until cache cleanup time.