Soap.InvokeRegistry.TDataContext.RemoveObjectToDestroy

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure RemoveObjectToDestroy(Obj: TObject);

C++

void __fastcall RemoveObjectToDestroy(System::TObject* Obj);

Properties

Type Visibility Source Unit Parent
procedure
function
public
Soap.InvokeRegistry.pas
Soap.InvokeRegistry.hpp
Soap.InvokeRegistry TDataContext

Description

Remove an object from the list of objects to free when the data context is freed.

Call RemoveObjectToDestroy to remove an object instance from the list of temporary objects that TDataContext maintains. This prevents TDataContext from freeing the object when it is itself freed.

For example, TRemotable descendants that are created by a Web Service application when it executes an invokable interface call are automatically added to a data context that persists for the length of the method call. When an application changes the remotable object's DataContext property, it automatically calls RemoveObjectToDestroy so that the object is not automatically freed when the method call is complete.

See Also