<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>I am adding rows to an OsiSolverInterfacePtr in const blocks using
addRows. After adding them I want to delete the memory but I get a compiler
error since the destructor for OsiPackedVectorBase is protected. Should
the destructor be protected if it is virtual? Should it not just inherit
the destructor from OsiPackedVector?</tt>
<br><tt>&nbsp;</tt><tt></tt>
<p><tt>OsiPackedVectorBase* row_list[constsize];</tt>
<br><tt>... row_list[count] = new OsiPackedVector(row);</tt><tt></tt>
<p><tt>.......</tt><tt></tt>
<p><tt>//Compiler Error</tt>
<br><tt>for(int ii=0;ii&lt;constsize;ii++)</tt>
<br><tt>... delete row_list[ii];</tt><tt></tt>
<p><tt>//No Compiler Error</tt>
<br><tt>for(int ii=0;ii&lt;constsize;ii++)</tt>
<br><tt>... delete (OsiPackedVector*)row_list[ii];</tt>
<br><tt></tt>&nbsp;
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>Thanks,</tt>
<br><tt>Matt</tt>
<br><tt></tt>&nbsp;
<br><tt></tt>&nbsp;
<p>--
<br>Matthew Galati
<br>Lehigh University, Bethlehem, PA - Operations Research, M.S.
<br>Stetson University, Deland, FL - Mathematics, B.S.
<br>Office Phone: 610-758-4042
<br>Email: magh@lehigh.edu, magal11@us.ibm.com
<br>URL: <A HREF="http://www.lehigh.edu/~magh/magh.html">http://www.lehigh.edu/~magh/magh.html</A>
<br>&nbsp;</html>