MCPcopy Create free account
hub / github.com/pybind/pybind11 / NoisyAlloc

Method NoisyAlloc

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

Source from the content-addressed store, hash-verified

364 // Class that has verbose operator_new/operator_delete calls
365 struct NoisyAlloc {
366 NoisyAlloc(const NoisyAlloc &) = default;
367 explicit NoisyAlloc(int i) { py::print(py::str("NoisyAlloc(int {})").format(i)); }
368 explicit NoisyAlloc(double d) { py::print(py::str("NoisyAlloc(double {})").format(d)); }
369 ~NoisyAlloc() { py::print("~NoisyAlloc()"); }

Callers 1

create_and_destroyFunction · 0.80

Calls 3

printFunction · 0.85
strClass · 0.85
formatMethod · 0.45

Tested by

no test coverage detected