Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 08-25-2007, 07:41 AM   #1 (permalink)
chokitofrito
Recruit
 
Join Date: Aug 2007
Posts: 1
chokitofrito is on a distinguished road
Thumbs up Tree problem

Hi there, I just want to know if, when I create a large binary tree, and I re-"pointed" the root pointer to another node somewhere below in that same tree (say, a terminal node), will the "upper" parts of the tree (starting from the new root node) be removed/deleted from memory? Please explain your answers.
Thank you.

Sorry for my English.
chokitofrito is offline   Reply With Quote
Old 08-25-2007, 11:15 AM   #2 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 596
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
I suppose that depends on your implementation of the tree and whether there are any other live references to those nodes.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote
Old 08-26-2007, 06:14 PM   #3 (permalink)
Belisarius
Java fanboy
 
Belisarius's Avatar
 
Join Date: Aug 2003
Posts: 1,151
Belisarius is on a distinguished road
To elaborate, the garbage collection in Java is pretty good. If there are objects (in this case, parts of the tree) that are no longer being referenced by the program, Java will probably free up the memory.
__________________
GitS
Belisarius is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
A small problem in the output the_master Standard C, C++ 1 12-17-2006 09:09 AM
parse error problem in game.. can't seem to find problem solution. slashdot Standard C, C++ 5 08-03-2005 08:15 PM
Heap Tree TBNolan Standard C, C++ 3 04-28-2005 12:06 PM
Problem Assignment (Urgent help req.) Boltress Standard C, C++ 0 01-12-2005 07:59 AM
Help debugging a power problem Belisarius Lounge 0 10-25-2003 04:44 PM


All times are GMT -8. The time now is 11:04 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting