[shared] Create ExpiringPointer: in DEBUG, check that pointers to

memoized functions are not used when invalid
This commit is contained in:
Émilie Feral
2018-10-23 17:46:15 +02:00
parent 8e6cff9572
commit e8b58a2b5b
29 changed files with 108 additions and 49 deletions

View File

@@ -309,7 +309,7 @@ int StorageValuesController::maxNumberOfElements() const {
}
double StorageValuesController::evaluationOfAbscissaAtColumn(double abscissa, int columnIndex) {
StorageFunction * function = functionStore()->modelForRecord(recordAtColumn(columnIndex));
ExpiringPointer<StorageFunction> function = functionStore()->modelForRecord(recordAtColumn(columnIndex));
TextFieldDelegateApp * myApp = (TextFieldDelegateApp *)app();
return function->evaluateAtAbscissa(abscissa, myApp->localContext());
}