[Coin-discuss] OsiPackedVector question

Matthew Galati magh at lehigh.edu
Sat Sep 14 10:42:28 EDT 2002


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?


OsiPackedVectorBase* row_list[constsize];
... row_list[count] = new OsiPackedVector(row);

.......

//Compiler Error
for(int ii=0;ii<constsize;ii++)
... delete row_list[ii];

//No Compiler Error
for(int ii=0;ii<constsize;ii++)
... delete (OsiPackedVector*)row_list[ii];



Thanks,
Matt



--
Matthew Galati
Lehigh University, Bethlehem, PA - Operations Research, M.S.
Stetson University, Deland, FL - Mathematics, B.S.
Office Phone: 610-758-4042
Email: magh at lehigh.edu, magal11 at us.ibm.com
URL: http://www.lehigh.edu/~magh/magh.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20020914/eb2c7789/attachment.html>


More information about the Coin-discuss mailing list