10
10
11
11
#pragma once
12
12
13
- #include < iostream>
14
-
15
13
#if defined(_MSC_VER)
16
14
# pragma warning(push)
17
15
# pragma warning(disable: 4100) // warning C4100: Unreferenced formal parameter
@@ -1096,11 +1094,9 @@ struct holder_check_impl<detail::HolderTypeId::SharedPtr> : public holder_check_
1096
1094
// Check use_count(), assuming that we have an accurate count (no competing threads?)
1097
1095
if (load_type == detail::LoadType::DerivedCppSinglePySingle) {
1098
1096
if (h.use_count () > 1 ) {
1099
- std::cout << " SharedPtr holder has use_count() > 1 on destruction for a Python-derived class." << std::endl;
1100
1097
// Increase reference count
1101
1098
const auto & release_info = lowest_type->release_info ;
1102
1099
if (release_info.can_derive_from_wrapper ) {
1103
- std::cout << " Attempting to interrupt" << std::endl;
1104
1100
// Increase reference count
1105
1101
object obj = reinterpret_borrow<object>(src);
1106
1102
// Release to C++.
@@ -1240,7 +1236,6 @@ class class_ : public detail::generic_type {
1240
1236
int orig_count = self.ref_count ();
1241
1237
unused (orig_count); // Suppress release build warnings.
1242
1238
assert (orig_count == 3 );
1243
- std::cout << " Using custom __del__" << std::endl;
1244
1239
1245
1240
auto v_h = inst->get_value_and_holder (lowest_type);
1246
1241
detail::holder_erased holder_raw (v_h.holder_ptr (), release_info.holder_type_id );
@@ -1627,8 +1622,6 @@ class class_ : public detail::generic_type {
1627
1622
1628
1623
// Check tp_dealloc
1629
1624
if (is_py_derived) {
1630
- std::cout << " Have non-pybind11 type" << std::endl;
1631
-
1632
1625
// TODO(eric.cousineau): Consider moving this outside of this class,
1633
1626
// to potentially enable multiple inheritance.
1634
1627
const std::string orig_field = " _pybind11_del_orig" ;
@@ -1651,9 +1644,6 @@ class class_ : public detail::generic_type {
1651
1644
object new_dtor_py = cpp_function (del_new, is_method (h_type));
1652
1645
setattr (h_type, " __del__" , new_dtor_py);
1653
1646
setattr (h_type, orig_field.c_str (), del_orig);
1654
- std::cout << " Replacing dtor with pybind11 dtor" << std::endl;
1655
- } else {
1656
- std::cout << " Already has custom del" << std::endl;
1657
1647
}
1658
1648
}
1659
1649
}
0 commit comments