|
Question : HEAP[.exe]: Invalid Address specified to RtlValidateHeap( 00350000, 0115E000 )
|
|
Hi
again I have troubles with the heap!
I have a CView class. In OnInitialUpdate() I create a new CRecordset class (on the heap) it is only destructed in the destructor of the CView class.
I have a message handler - OnRefreshWindow which is called when the application views are switched. This handler uses the recordset to requery for a specific record.
On the initial swith to this view everything is working fine - everytime.
On sometimes second and more often third switch to this view, I get the error
HEAP[Acquisition.exe]: Invalid Address specified to RtlValidateHeap( 00350000, 0115E000 )
I trace this to my message handler and a call to rs.Requery(); tracing into requery, the problem occurs in CRecordset::Close()
line 1152: delete [] m_rgODBCFieldInfos;
In my code I can find nowwhere where I have overwritten the memory for the recordset and this problem only started to happen now.
Can anyone help?
Thanks anti
|
|
Answer : HEAP[.exe]: Invalid Address specified to RtlValidateHeap( 00350000, 0115E000 )
|
|
Try to explicity close all you data (like recordsets and database) at the very first part of your destructor. But, there is some strange, data must not reside in view but in doc object according with doc/view model....
|
|
|
|