From Appmethod Libraries
Jump to: navigation, search


Object Pascal

TObjectMessage<T: class> = class(TMessage<T>)


template<typename T> class PASCALIMPLEMENTATION TObjectMessage__1 : public TMessage__1<T>


Type Visibility Source Unit Parent
class public
System.Messaging System.Messaging


Base class for messages containing objects.

The contents of a TMessage can be of any type, including classes. However, when you create a TMessage with an object as value, TMessage does not take ownership of the object; you must delete the object yourself, and ensure that the message has been deleted first.

TObjectMessage provides an additional property to solve this issue. When you create a TObjectMessage, you can specify whether or not the message should take ownership of the object that it contains. If you specify that the message must own its contents, the contents of the message are destroyed when you destroy the message.

See Also