-
invalid address specified to RtlFreeHeapIT/Visual Studio 2009. 5. 14. 17:01
Invalid Address specified to RtlFreeHeap 에러는 주로 DLL 관련 개발을 하다가 만나게 된다.
해결 방법은 아래와 같다.
프로그램에서 사용하는 DLL들과 메인 프로그램 모두의 설정을 아래와 같이 변경한다.
Setting -> C/C++ --> Code Generation --> MultiThreaded DLL (Debug모드일 경우 MultiThreaded DLL Debug)
참고 : http://lists.trolltech.com/qt-interest/2001-10/thread00530-0.html
MultiThreaded 로만 할 경우 각각의 DLL과 프로그램이 Heap을 따로 사용하고 MultiThreaded DLL로 하면 모든 DLL과 프로그램들이 Heap을 하나로 사용한다. 결국 MultiThreaded 로 하면 Heap이 다르기 때문에 A라는 DLL에서 메모리를 할당하고 B라는 DLL에서 그 할당한 메모리를 해제할 경우 오류가 발생한다.
'IT > Visual Studio' 카테고리의 다른 글
소스세이프(SourceSafe)에 연결된 프로젝트의 소스세이프 정보 제거 (0) 2009.07.30 Run-Time Check Failure #2 - Stack around the variable ~~ was corrupted (0) 2009.06.26 map 파일을 활용한 디버그 방법 (0) 2009.05.14 Visual C++ 6.0 에서 Iphlpapi.h 인클루드 관련 에러 해결방법 (0) 2009.02.26 Windows Vista 에서 Visual Studio 6.0 설치하기 (0) 2009.02.26