MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / removeAllDestinations

Method removeAllDestinations

src/utils/DefaultLogger.cpp:85–101  ·  view source on GitHub ↗

Remove all logs destination previously set

Source from the content-addressed store, hash-verified

83
84// Remove all logs destination previously set
85void DefaultLogger::removeAllDestinations() {
86
87 // Delete all the destinations
88 for (uint32 i=0; i<mDestinations.size(); i++) {
89
90 size_t size = mDestinations[i]->getSizeBytes();
91
92 mDestinations[i]->~Destination();
93
94 // Make sure capacity is an integral multiple of alignment
95 size = std::ceil(size / float(GLOBAL_ALIGNMENT)) * GLOBAL_ALIGNMENT;
96
97 mAllocator.release(mDestinations[i], size);
98 }
99
100 mDestinations.clear();
101}
102
103// Log something
104void DefaultLogger::log(Level level, const std::string& physicsWorldName, Category category, const std::string& message, const char* filename, int lineNumber) {

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.45
getSizeBytesMethod · 0.45
~DestinationMethod · 0.45
releaseMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected