473,414 Members | 1,627 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Allocation Conflict Error

Hi,
I have a class in one DLL. Something like this:
class CLASS1
{
MyData* pData;
CLASS1()
{
pData = NULL;
}
Load()
{
pData = new MyData;
}

~CLASS1()
{
if (pData)
pData = delete pData;
}
}
Then in another DLL.
I have
CLASS1 myClass;
myClass.Load();
....
For release build, in boundscheker, I got this error message at the
destructor of CLASS1 (pData = delete pData;)

Allocation Conflict: Attempting to call global_operator_delete on
pointer 0x322E5D8, that was allocated by HeapAlloc.

Why the "new" was using HeapAlloc while the "delete" use
"global_operator_delete"(defined in afx.inl)?

Thanks!
Jul 19 '05 #1
1 3186
On 31 Oct 2003 11:41:06 -0800, si*******@hotmail.com (Majuer) wrote in
comp.lang.c++:
Hi,
I have a class in one DLL. Something like this:
class CLASS1
{
MyData* pData;
CLASS1()
{
pData = NULL;
}
Load()
{
pData = new MyData;
}

~CLASS1()
{
if (pData)
pData = delete pData;
}
}
Then in another DLL.
I have
CLASS1 myClass;
myClass.Load();
...
For release build, in boundscheker, I got this error message at the
destructor of CLASS1 (pData = delete pData;)

Allocation Conflict: Attempting to call global_operator_delete on
pointer 0x322E5D8, that was allocated by HeapAlloc.

Why the "new" was using HeapAlloc while the "delete" use
"global_operator_delete"(defined in afx.inl)?

Thanks!


Ask in a Windows programming newsgroup. None of DLL, HeapAlloc, or
global_operator_delete are defined by C++, they are all Microsoft
specific.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Fardude | last post by:
I have a few tables in SQL Server 2000 and a small Access 97 that has linked tables used to insert/update/delete into SQL Server 2k tables. Everything works fine except Updating one of these...
0
by: Smriti Dev | last post by:
Hi, I have a ms access table table which is linked to a mysql database table. I have used a ms access form to edit records. However, when I attempt to edit a record I get a write conflict error...
0
by: manning_news | last post by:
Using A2K. I've got a form for clients that has a subform that is a cartesian product between client ID and a lookup table for types of income. So each client has the exact same number of income...
3
by: rivka.howley | last post by:
I recently added some code to the BeforeUpdate event of a text box on a form. The code uses the new value in the text box to recalculate some values in another table, which is shown in a subform on...
21
by: Peter Nurse | last post by:
I have just upgraded to SQL Server 2005 from SQL Server 2000. In Microsoft SQL Server Management Studio, when I click on database properties, I receive the following error:- Cannot resolve the...
1
by: S.Dickson | last post by:
I have a database with access as front end and Mysql as back end. I am gettting the following 'Write Conflict' Error. when i am on my order form, This form does has a subform where i enter all the...
2
by: mrsgwen90 | last post by:
I am trying to update a record using access as the front end and VB 6.0 as the backend. I am using a SQL statement to accomplish this. But I am getting the "Write Conflict Error". I have tried...
3
by: gazsharpe101 | last post by:
Hi everyone, I am doing some work on my company's database. It is a MS Access 2003 front-end with an SQL back-end. Recently, I have asked the database administrator to add some new fields to...
1
by: Ryan Swaby | last post by:
I have an access form that is bound to an ado recordset using the following code in the form open event. Dim cn As ADODB.Connection Dim rs As ADODB.Recordset 'Use the ADO...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.