mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[shared] Create ExpiringPointer: in DEBUG, check that pointers to
memoized functions are not used when invalid
This commit is contained in:
17
apps/shared/expiring_pointer.cpp
Normal file
17
apps/shared/expiring_pointer.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "expiring_pointer.h"
|
||||
#include "storage_expression_model.h"
|
||||
#include "storage_cartesian_function.h"
|
||||
#include "storage_function.h"
|
||||
|
||||
namespace Shared {
|
||||
|
||||
#if DEBUG
|
||||
template<>
|
||||
StorageExpressionModel * ExpiringPointer<StorageExpressionModel>::s_global = nullptr;
|
||||
template<>
|
||||
StorageFunction * ExpiringPointer<StorageFunction>::s_global = nullptr;
|
||||
template<>
|
||||
StorageCartesianFunction * ExpiringPointer<StorageCartesianFunction>::s_global = nullptr;
|
||||
#endif
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user