Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-15-2007, 06:40 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Garbage Collection

Yumm, garbage. Someone care to explain to me what all the garbage collection features GS2 has?

Also, do references exist in GS2? For example, say you do this:
PHP Code:
= new TStaticVar(); 
So, a variable n is created; a TStaticVar() is also created, in the memory of the server/client. Let's call the memory address 102 (an example). So n holds a reference to address 102. Now what if we do this:
PHP Code:
n.var1 "blah";
n
Now will x have a reference to 102? Or does it create a new TStaticVar, and then copy the vars? What if I were to do something like this?
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
= new TStaticVar();
  
x;
  
y.var1 "blah";
  echo( 
x.var1 );

What does that echo? I can't get on RC now, and I probably won't be able to for a while.

Can anyone please clear this up for me?

Then, if I go:
PHP Code:
NULL// Not destroying the object, dropping the reference
NULL// Likewise
// Now, as all references are dropped, is the TStaticVar dropped from the memory (collected by garbage collection)? 
Thanks,
Chris Zakuto
PS: Yes, I'm a Java geek.
__________________
Reply With Quote
 


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

Forum Jump


All times are GMT +2. The time now is 10:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.