this method is called when delete_datareader is called.
| 150 | |
| 151 | // this method is called when delete_datareader is called. |
| 152 | void |
| 153 | DataReaderImpl::cleanup() |
| 154 | { |
| 155 | // As first step set our listener to nill which will prevent us from calling |
| 156 | // back onto the listener at the moment the related DDS entity has been |
| 157 | // deleted |
| 158 | set_listener(0, NO_STATUS_MASK); |
| 159 | |
| 160 | #ifndef OPENDDS_NO_OWNERSHIP_KIND_EXCLUSIVE |
| 161 | OwnershipManagerPtr owner_manager = this->ownership_manager(); |
| 162 | if (owner_manager) { |
| 163 | owner_manager->unregister_reader(topic_servant_->type_name(), this); |
| 164 | } |
| 165 | #endif |
| 166 | |
| 167 | // Acquire the sample lock since these pointers are read under it. |
| 168 | ACE_GUARD(ACE_Recursive_Thread_Mutex, guard, sample_lock_); |
| 169 | |
| 170 | topic_servant_ = 0; |
| 171 | |
| 172 | #ifndef OPENDDS_NO_CONTENT_FILTERED_TOPIC |
| 173 | { |
| 174 | ACE_Guard<ACE_Thread_Mutex> guard_cft(content_filtered_topic_mutex_); |
| 175 | content_filtered_topic_ = 0; |
| 176 | } |
| 177 | #endif |
| 178 | |
| 179 | #ifndef OPENDDS_NO_MULTI_TOPIC |
| 180 | multi_topic_ = 0; |
| 181 | #endif |
| 182 | |
| 183 | } |
| 184 | |
| 185 | void DataReaderImpl::init( |
| 186 | TopicDescriptionImpl* topic_desc, |
nothing calls this directly
no test coverage detected