moved dodeleteounter flag from envelope to sharedcounter object (new SharedPtr code)