Memory leaks plague virtually all software written in C++ or any other language that requires programmers to manage memory. OpenSees is no exception. With code written by many people with varying knowledge of C++ and very little overall QA/QC, it's fair to say OpenSees has more than its fair share of memory leaks. It's a … Continue reading How to Find a Memory Leak in OpenSees
Tag: C++
No Exit
Have you ever seen OpenSees.exe vanish all of a sudden or received a "Kernel died" message when running OpenSeesPy in a Jupyter Notebook? The C++ exit() function is the likely culprit. Or a segmentation fault. But this post will focus on the exit() function. Some grepping and line counting reveals over 2,000 calls to exit() … Continue reading No Exit
Unretiring the String Class
If you've compiled the OpenSees source code, you may have noticed the SRC/string directory, whose two files, G3string.h and G3string.cpp, implement character strings as first-class objects, complete with overloaded operators and deep copies. G3string is based on the String class, which I used for programming projects in my undergraduate computer science courses. In the G3string.h … Continue reading Unretiring the String Class