15 Sep
2009
15 Sep
'09
1:41 a.m.
Hello! :) I'm writing a write-through cache unit which returns const shared_ptr<T>. After the data has been modified and once share_ptr goes out of scope, I would like the shared_ptr destructor to call a handler which would commit the modified value to some other location -- a DHT for instance. Is there a way to supply a callback function to shared_ptr destructor? Any help would be greatly appreciated. Please let me know if the question is too ambiguous. Thanks! V