sanad_ab
28-05-2004, 11:08 AM
السلام عليكم
انا عضو جديد ارجو ان تقبلوني
احب ان استفسر من محترفي جافا عن Garbage collector او ما يسمى بمجمع النفايات وماهية دوره عند امتلاء الذاكرة :06:
eng_java
09-06-2004, 09:47 AM
Hi I will give you the answer soon
eng_java
09-06-2004, 09:51 AM
DEAR NEW mEMBER...
Salam,
its known that JAVA had elimenated pointers in
C language, and introduced a new way of defining
variables- by creating OBJECTS
an object is a pool of memory that is referenced
by variable name ( passed by reference).
suppose you defined a String object :
String s = new String("Hi");
this means that s points to Hi,
now notice:
s = new String ("welcome");
what happens then??
s variable will leave pointing to "Hi", and
points to a new memory pool containing "welcome"
"Hi" will remain in memory without being freed,
so Garbage collection 'collect' all variables
that lost thier reference and free thiert space
and resources again.
Grabage Collection is one reason why Java runs
slow.
for any further quastions email me at mavrikil@yahoo.com
thank you , Ala' M. Ayyad - Palestine / Al Quds
جميع حقوق برمجة vBulletin محفوظة ©2024 ,لدى مؤسسة Jelsoft المحدودة.
جميع المواضيع و المشاركات المطروحة من الاعضاء لا تعبر بالضرورة عن رأي أصحاب شبكة المنتدى .