Regular expressions, C++ kai linux
Dimitrios Kamenopoulos
el97146 at mail.ntua.gr
Mon Jun 24 22:23:02 EEST 2002
A kai shmeiwteon oti den apagorevetai na xrhsimopoihseis p.x. th free gia na
eleu8erwseis kati pou desmeuthke me maloc. Toso h malloc oso kai h free
anhkoun sto protypo ths C++ kai gia sovarous logous. Apla apagorevetai na
kaneis pragmata opws:
patata1:
A * a = new A;
free(a);
patata2:
A * a = (A*) malloc(sizeof(A));
delete a;
Dhladh den prepei na anamignyeis tous dyo tropous. Opou exeis malloc
xrhsimopoieis free, opou exeis new xrhsimopoieis delete kai opou exeis
antikeimena me constructors kai destructors *prepei* na xrhsimopoieis new kai
delete, auto einai olo.
More information about the Linux-greek-users
mailing list