|
Download cpp/cpp-debug-memory.jsonl from winapiadmin/tinycodinglm: direct link, hf CLI and curl.
- Browser
- Download file 898 Bytes
-
https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/cpp/cpp-debug-memory.jsonl
- Command line
-
hf download hf://datasets/winapiadmin/tinycodinglm@034ba678829a1c436b19d43dd3adab33b5170a80/cpp/cpp-debug-memory.jsonl
-
curl -L -o cpp-debug-memory.jsonl https://huggingface.co/datasets/winapiadmin/tinycodinglm/resolve/034ba678829a1c436b19d43dd3adab33b5170a80/cpp/cpp-debug-memory.jsonl
898 Bytes
| {"type": "session", "harness": "opencode", "id": "cpp-debug-memory", "name": "Debugging C++ Memory Leaks"} | |
| {"type": "message", "message": {"role": "system", "content": "You are an expert debugger."}} | |
| {"type": "message", "message": {"role": "user", "content": "How to find and fix C++ memory leaks?"}} | |
| {"type": "message", "message": {"role": "assistant", "content": "Tools:\n1. ASAN with leak detection: -fsanitize=address, ASAN_OPTIONS=detect_leaks=1\n2. Valgrind Memcheck: valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes\n3. Visual Studio: _CrtSetDbgFlag / _CrtDumpMemoryLeaks\n\nCommon leak sources:\n- Exception thrown before delete: use smart pointers\n- Early return without cleanup\n- Circular reference with shared_ptr: use weak_ptr\n- Overwriting pointer: ptr = new X; ptr = new Y; loses first\n\nFix: wrap in std::unique_ptr, std::shared_ptr, or RAII wrappers."}} | |