JVCL Help:TJvClipboard.DestroyHandle

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Summary

Ensures the delayed rendering formats are rendered before destroying the clipboard object


Pascal

 procedureDestroyHandle;


Description

To ensure that the formats using delayed rendering are saved when the application terminates, it is necessary that we get their values before actually destroying the underlying window (which handle is given by the Handle property) As a result, the OnRenderFormat event will be fired for every format with delayed rendering still in the clipboard. This could lead to memory problems if the format is quite big. You should then asks the user if he wants to keep the big objects available for other programs If you don't call this method and some formats are in the clipboard with delayed rendering, it will be called upon destruction of the clipboard, which is likely to happen after the destruction of the object where the event is set. I let you imagine the consequences... So you should call this function from the destructor (or the OnDestroy event) of the component where the OnRenderFormat event handler is set (eg, the main form) as this component is likely to be destroyed before the clipboard itself.


See Also

TJvClipboard.Handle, TJvClipboard.OnRenderFormat


About

Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page