| Summary: | memory leak in SDL_dx5events.c | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Danijel Kopcinovic <danijel.kopcinovic> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | danijel.kopcinovic |
| Version: | 1.2.9 | ||
| Hardware: | x86 | ||
| OS: | Windows (All) | ||
I implemented a slightly different fix in CVS. Could you check it out and make sure it does the right thing? I've downloaded the latest SDL zip, but I'm having problems with building. The docs indicate that I need DirectX SDK to build, so I downloaded and installed it, but the build does not work. It complains about not being able to find mmintrin.h. Therefore, I cannot affirm or deny if your fix is ok. (In reply to comment #2) > I've downloaded the latest SDL zip, but I'm having problems with building. The > docs indicate that I need DirectX SDK to build, so I downloaded and installed > it, but the build does not work. It complains about not being able to find > mmintrin.h. Therefore, I cannot affirm or deny if your fix is ok. > You need to install the VC++ processor pack. |
In DX5_DestroyWindow routine, I got a memory leak. I was due to not freeing SDL_Appname variable. Here is my fix for this: void DX5_DestroyWindow(_THIS) { /* Close down DirectInput */ DX5_DInputQuit(this); /* Destroy our window */ if ( SDL_windowid ) { SetWindowLong(SDL_Window, GWL_WNDPROC, (LONG)userWindowProc); } else { DestroyWindow(SDL_Window); } //! Added by Danijel Kopcinovic as a fix for memory leak. if (SDL_Appname != 0) free(SDL_Appname); SDL_Appname = 0; }