Some proxies are used to fasten data manipulation (e.g., WeightedData) are error prone (segfaults) or induce non user-friendly manipulation (e.g., ProxyError thrown).
From now, these proxies are constructed from a pointer to the decorated data and store this pointer.
Since this decorated data can be deleted, some tests are required to ensure that pointed data still exists.
Since most of these proxies are constructed from data that won't be modified, using the COW design pattern will as efficient and far more user-friendly.
Some proxies are used to fasten data manipulation (e.g.,
WeightedData
) are error prone (segfaults) or induce non user-friendly manipulation (e.g.,ProxyError
thrown).From now, these proxies are constructed from a pointer to the decorated data and store this pointer. Since this decorated data can be deleted, some tests are required to ensure that pointed data still exists. Since most of these proxies are constructed from data that won't be modified, using the COW design pattern will as efficient and far more user-friendly.