Teach adopt() to hold the adopted pointer in custom pointer type.