-
استفسار بسيط
السلام عليكم
انا عضو جديد ارجو ان تقبلوني
احب ان استفسر من محترفي جافا عن Garbage collector او ما يسمى بمجمع النفايات وماهية دوره عند امتلاء الذاكرة
-
Re: استفسار بسيط
Hi I will give you the answer soon
-
Re: استفسار بسيط
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
-
ضوابط المشاركة
- لا تستطيع إضافة مواضيع جديدة
- لا تستطيع الرد على المواضيع
- لا تستطيع إرفاق ملفات
- لا تستطيع تعديل مشاركاتك
-
قوانين المنتدى