MCPcopy Create free account
hub / github.com/pybind/pybind11 / operator new

Method operator new

tests/test_factory_constructors.cpp:371–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369 ~NoisyAlloc() { py::print("~NoisyAlloc()"); }
370
371 static void *operator new(size_t s) {
372 py::print("noisy new");
373 return ::operator new(s);
374 }
375 static void *operator new(size_t, void *p) {
376 py::print("noisy placement new");
377 return p;

Callers

nothing calls this directly

Calls 1

printFunction · 0.85

Tested by

no test coverage detected