Hey i have something wrong with my code plz help me

hey i have an problem with OF
here is the thing i wanna create new image object with mouseReleased event!!
i made class image11 and then i put any values and image informations in the class
and i used it on testApp
but after closing the program there is an error about Access violation writing location 0x026aa339.
i guess it’s about memory part like delete() or clear()??
i know what it happened but i can’t handle it so i almost get angry with it
plz help me give me some wisdom with specific code : (

here is my code!!!
i deleted some codes for reading easily

////////// error part!!!
void operator delete(
void *pUserData
)
{
_CrtMemBlockHeader * pHead;

RTCCALLBACK(_RTC_Free_hook, (pUserData, 0));

if (pUserData == NULL)
return;

_mlock(_HEAP_LOCK); /* block other threads */
__TRY

/* get a pointer to memory block header */
pHead = pHdr(pUserData);

/* verify block type */
_ASSERTE(_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)); <---- this part!!!

_free_dbg( pUserData, pHead->nBlockUse );

__FINALLY
_munlock(_HEAP_LOCK); /* release other threads */
__END_TRY_FINALLY

return;
}

#endif /* _DEBUG */

//image11.cpp
#include “image11.h”

image11::image11()
{
checkImg=false;
tmpimg.loadImage(“clover.png”);

}
void image11::inputValue(int _x,int _y)
{
x = _x;
y = _y;
checkImg=true;
}
void image11::update(){

}

void image11::draw(){

if(checkImg)
{
tmpimg.draw(x,y);
}

}
////////////// testApp.h
#pragma once

#define WEBCAM

#include “ofMain.h”
#include “image11.h”

class testApp : public ofBaseApp{
public:

void setup();
void update();
void draw();

void kkk();
void keyPressed (int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
public:

image11 theImg[10]; <---- make image11 class with array

};

///////
//////////////////////////////// testApp

void testApp::mouseReleased(int x, int y, int button){

if(countNum<=9)
theImg[countNum].inputValue(mouseX,mouseY);
if(countNum<=9)
countNum++;

waterSound.stop();
bBrushDown = false;
i1 = 0;
i2 = 0;
i3 = 0;
i4 = 0;
i5 = 0;
i6 = 0;
i7 = 0;
i8 = 0;
copied_x1=calculated_x;
copied_y1=calculated_y;
copied_x2=calculated_x;
copied_y2=calculated_y;
copied_x3=calculated_x;
copied_y3=calculated_y;

maskFbo.begin();
ofClear(0,0,0,255);
maskFbo.end();

}

why are you writing your own delete?

No i didn’t.
i guess that works automatically
while debugging it’s stuck with the code
so i wrote it

gotcha - are you calling delete anywhere?

It’s the MSVS C++ scalar delete routine (…\VC\crt\src\dbgdel.cpp).

What about Call Stack?