MCPcopy Create free account
hub / github.com/RaftLib/RaftLib / ~kernel_wrapper

Method ~kernel_wrapper

src/kernel_wrapper.cpp:37–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37kernel_wrapper::~kernel_wrapper()
38{
39 /**
40 * check for sentinal value, if it's there..then we don't need
41 * to delete this one as the map object already has ownership
42 */
43 if( reinterpret_cast< std::uintptr_t >( k ) != kernel_wrapper::sentinel )
44 {
45 delete( k );
46 /**
47 * set sentinal value just in case this one happens to belong to two
48 * wrapper objects. It also helps to make sure you can't accidentally
49 * pass the map an invalid wrapped kernel
50 */
51 k = reinterpret_cast< raft::kernel* >( kernel_wrapper::sentinel );
52 }
53}
54
55raft::kernel* kernel_wrapper::operator *()
56

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected