Issue with crash at exit

Hey guys,

Not sure what is happening here, but all of a sudden I started having crash issues when I close my program. The thing is, it started happening after I added a destructer to a class I made. I'll be honest when it comes to classes and destructors I'm pretty new so I really don't even fully understand how those actually work, or when they need to be used. I just heard that classes should have destructors and that not having them could lead to memory leaks. So, even though everything was running good, I thought I should probably add a destructor to this class.
The first time I compiled and ran after adding the destructor, it crashed when exiting. After googling for a while I found a function "int _CrtDumpMemoryLeaks( void );". I read that I should use this right before the program exits and see if there is any leaks. Here is what I got:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
First-chance exception at 0x0058DF58 (msvcp120d.dll) in SINDER.exe: 0xC0000005: Access violation reading location 0x00000036.
Unhandled exception at 0x0058DF58 (msvcp120d.dll) in SINDER.exe: 0xC0000005: Access violation reading location 0x00000036.

First-chance exception at 0x7710017E (ntdll.dll) in SINDER.exe: 0x00000000: The operation completed successfully.
The thread 0x4060 has exited with code -1073741510 (0xc000013a).
The thread 0x410c has exited with code -1073741510 (0xc000013a).
The thread 0x40a0 has exited with code -1073741510 (0xc000013a).
The thread 0x47cc has exited with code -1073741510 (0xc000013a).
The thread 0x3e4c has exited with code -1073741510 (0xc000013a).
The thread 0x3cac has exited with code -1073741510 (0xc000013a).
The thread 0x1e54 has exited with code -1073741510 (0xc000013a).
The thread 0x41cc has exited with code -1073741510 (0xc000013a).
The thread 0x3dc4 has exited with code -1073741510 (0xc000013a).
The thread 0x3cf8 has exited with code -1073741510 (0xc000013a).
The thread 0x7d4 has exited with code -1073741510 (0xc000013a).
The thread 0x3dbc has exited with code -1073741510 (0xc000013a).
The thread 0x4774 has exited with code -1073741510 (0xc000013a).
The thread 0x4044 has exited with code -1073741510 (0xc000013a).
The thread 0x4068 has exited with code -1073741510 (0xc000013a).
The program '[14576] SINDER.exe' has exited with code -1073741510 (0xc000013a).


Where it says "the thread 0xblah has exited with code -1073741510 (address?)
Is that the leak? If so how do I clean it up? and stop the program from crashing.

Also, I didn't post it, but there are other statements like this that say "code returned 0" before this is displayed. I'm guessing that is memory that has been cleared? Any help on this would be appriciated. If needed I will supply the source if it helps with debugging this issue.


Topic archived. No new replies allowed.