*/
wxEXPLICIT wxSharedPtr(T* ptr = NULL);
+ /**
+ Constructor.
+
+ Creates shared pointer from the raw pointer @a ptr and deleter @a d
+ and takes ownership of it.
+
+ @param ptr The raw pointer.
+ @param d Deleter - a functor that is called instead of delete to
+ free the @a ptr raw pointer when its reference count drops to
+ zero.
+
+ @since 3.0
+ */
+ template<typename Deleter>
+ wxEXPLICIT wxSharedPtr(T* ptr, Deleter d);
+
/**
Copy constructor.
*/
*/
void reset(T* ptr = NULL);
+ /**
+ Reset pointer to @a ptr.
+
+ If the reference count of the previously owned pointer was 1 it will be deleted.
+
+ @param ptr The new raw pointer.
+ @param d Deleter - a functor that is called instead of delete to
+ free the @a ptr raw pointer when its reference count drops to
+ zero.
+
+ @since 3.0
+ */
+ template<typename Deleter>
+ void reset(T* ptr, Deleter d);
+
/**
Returns @true if this is the only pointer pointing to its object.
*/