Lines Matching refs:Parent
33 // Parent/Child are used in:
46 class Parent {
48 Parent() { py::print("Allocating parent."); }
49 ~Parent() { py::print("Releasing parent."); }
54 py::class_<Parent>(m, "Parent")
56 .def(py::init([](Child *) { return new Parent(); }), py::keep_alive<1, 2>())
57 .def("addChild", &Parent::addChild)
58 .def("addChildKeepAlive", &Parent::addChild, py::keep_alive<1, 2>())
59 .def("returnChild", &Parent::returnChild)
60 .def("returnChildKeepAlive", &Parent::returnChild, py::keep_alive<1, 0>())
61 .def("returnNullChildKeepAliveChild", &Parent::returnNullChild, py::keep_alive<1, 0>())
62 .def("returnNullChildKeepAliveParent", &Parent::returnNullChild, py::keep_alive<0, 1>());
66 class ParentGC : public Parent {
68 using Parent::Parent;
70 py::class_<ParentGC, Parent>(m, "ParentGC", py::dynamic_attr())