25.11.2015 Views

The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix E<br />

Troubleshooting<br />

When creating multiple tasks and running for a long time memory usage grows, and the Task and<br />

Env objects are never garbage collected.<br />

<strong>The</strong> Task and Environment objects cannot always be automatically garbage collected by <strong>Python</strong>,<br />

when when they are no longer in use. <strong>The</strong>re are two ways to ensure that they are destroyed. Use<br />

the with-statement:<br />

with Task(env,0,0) as t:<br />

t.readdata("somefile.task")<br />

# use the task<br />

This will ensure that the create Task is automatically destroyed when the with-statement exits.<br />

Alternatively, call the del () method directly when the object should not be used anymore.<br />

585

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!