Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


C++ new/delete


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Aroidzap   Members   -  Reputation: 652

Like
0Likes
Like

Posted 11 August 2012 - 05:03 PM

Simple, fast question.

is :
char *data=new char[256];
delete[] data;
char *data=new char[256];
delete[] data;
equal to :
char *data=new char[256];
char *data=new char[256];
delete[] data;

?

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 9625

Like
5Likes
Like

Posted 11 August 2012 - 05:04 PM

No. The second won't delete the first allocation.

#3 Aroidzap   Members   -  Reputation: 652

Like
0Likes
Like

Posted 11 August 2012 - 05:23 PM

thanks




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS