Products & Services Solutions Academia Support User Community Company

Learn more about MATLAB   

release - Release COM interface

Syntax

h.release
release(h)

Description

h.release releases the interface and all resources used by the interface. You must release the handle when you are done with the interface. A released interface is no longer valid. MATLAB generates an error if you try to use an object that represents that interface.

release(h) is an alternate syntax.

Releasing the interface does not delete the control itself (see the delete function), since other interfaces on that object might still be active.

COM functions are available on Microsoft Windows systems only.

Examples

  1. Create an instance of a Microsoft Calendar control. Get a TitleFont interface and use it to change the appearance of the calendar title font:

    f = figure('position',[300 300 500 500]);
    cal = actxcontrol('mscal.calendar', [0 0 500 500], f);
    
    TFont = cal.TitleFont;
    TFont.Name = 'Viva BoldExtraExtended';
    TFont.Bold = 0;
  2. After working with the title font, release the TitleFont interface:

    TFont.release;
    
  3. Delete the cal object and the figure window:

    cal.delete;
    delete(f);
    clear f;
    

See Also

actxcontrol | actxserver | delete (COM)

How To

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS