python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Destructor can not find member variable, can not delete memory, leading to memory leaks
I implement a class RedBlackTree like this. My questions are at the end.
template < class T,
class Node = ft::treeNode<T>,
class Type_Alloc = std::allocator<T>,...

Snow_Ball
Votes: 0
Answers: 0
pybind11: segfault on process exit with static py::object
I am using pybind11 to create a module in C++ and then importing it into a Python program. This is running through a normal script in CPython, not an embedded interpreter.
In my module, I have a funct...
Bobby Impollonia
Votes: 0
Answers: 1
Heap error in delete statement when object is destroyed in C++
I created a simple StringBuilder class to practice. A similar class is available in other programming languages.
When the destructor of this class is called, I try to delete the memory allocated to th...
MRJ
Votes: 0
Answers: 0
How to handle object destruction in a custom container?
I'm writing a custom Stack container that stores its elements in a fixed-size array:
template<typename T, uint32 TCapacity>
class Stack {
// Member functions omitted
T mData[TCapacity];
...
kromenak
Votes: 0
Answers: 1