Search Results

By Philippe Bonneau on 7/30/2013 8:39 AM
After debugging some code, in order to know why the methods CSRInstrument::GetInstance and gApplicationContext->GetCSRInstrument returned null in some cases, I discovered that the method CSRInstrument::MultiSave was used badly. In this case, the instrument was duplicated using the Clone method, setting the instrument code using the SetCode to 0, and using reserveCode in relationship with GetNewCode. The insertion into database was done using the CSRInstrument::MultiSave with a pmModification flag.
By Philippe Bonneau on 7/27/2013 11:40 AM

It's an old well-known subject, but since I've seen recently developers who were using the STL vector::clear method and who believed that this method make some deallocation, this post is to remember which method to use in such a case.

Search blog