MCPcopy Create free account
hub / github.com/OpenDDS/OpenDDS / cleanup

Method cleanup

dds/DCPS/DataReaderImpl.cpp:152–183  ·  view source on GitHub ↗

this method is called when delete_datareader is called.

Source from the content-addressed store, hash-verified

150
151// this method is called when delete_datareader is called.
152void
153DataReaderImpl::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
185void DataReaderImpl::init(
186 TopicDescriptionImpl* topic_desc,

Callers

nothing calls this directly

Calls 3

ownership_managerMethod · 0.80
unregister_readerMethod · 0.80
type_nameMethod · 0.45

Tested by

no test coverage detected