[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Delete a new array?

Posted on 2004-10-31
5
Medium Priority
?
226 Views
Last Modified: 2010-03-31
Hi Experts,

I used "new" to create array:
     double[][] myArray;
     int n;
     n = 3;
     myArray = new double[n][n];
Do I need to delete the array like that in C++? If I need, how to do that?

Thank you in advance.
0
Comment
Question by:daveask
  • 2
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
krakatoa earned 320 total points
ID: 12456236
When the array object is no longer pointed to by any other object, then it will be garbage collected.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12456238
krakatoa is correct
0
 

Author Comment

by:daveask
ID: 12456287
Thank you.

So, Java is better than C++ and VB in this aspect :-)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12456293
>>So, Java is better than C++

It has virtually automatic memory-management - there are no deletes, destructors, etc. I can't remember what VB does
0
 
LVL 17

Expert Comment

by:krakatoa
ID: 12456320
Thanks for points and thanks CEHJ. ;)

0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question