Close - Maple Help

Online Help

All Products    Maple    MapleSim

Result

 Close
 close a Result module

 Calling Sequence result:-Close( )

Parameters

 result - Result module

Description

 • Close frees the resources associated with result.  This happens automatically when result is garbage collected; however, you can call Close to release the resources immediately.
 • Any descendant modules of result are closed when result is closed.  (A module is a descendant of a parent module if it is returned by one of the parent module's exports or if it is a descendant of one of the parent module's descendants.)

Examples

Create a Result, res.

 > $\mathrm{driver}≔\mathrm{Database}\left[\mathrm{LoadDriver}\right]\left(\right):$
 > $\mathrm{conn}≔\mathrm{driver}:-\mathrm{OpenConnection}\left(\mathrm{url},\mathrm{name},\mathrm{pass}\right):$$\mathrm{res}≔\mathrm{conn}:-\mathrm{ExecuteQuery}\left("SELECT * FROM animals"\right):$

Close res.

 > $\mathrm{res}:-\mathrm{Close}\left(\right)$

Try using res.

 > $\mathrm{res}:-\mathrm{Next}\left(\right)$

 Error, (in ExecuteQuery) this object has been closed, no further operations are possible

 See Also