Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   Removing objects (https://forums.graalonline.com/forums/showthread.php?t=74023)

Twinny 05-17-2007 04:41 PM

Removing objects
 
Some example code below

PHP Code:

public function load(pl,id)
{
  
obj.(@pl@"_"@id) = new TStaticVar();
  
obj.(@pl@"_"@id).loadvars(some file);
}

public function 
save(pl,id)
{
  
obj.(@pl@"_"@id).savevars(some file0);
  
obj.(@pl@"_"@id).destroy();


It seemingly worked well until i noticed that obj retained dynamic vars. When I used my getinfo command on it, I found this
PHP Code:

Object Typeobj.Twinny_1 0
Static Vars0
Dynamic Vars


compared to an active one
PHP Code:

Object Typeobj.Twinny_1 TStaticVar
Static Varsinitialized,joinedclasses,name,scriptlogmissingfunctions,timeout
Dynamic Vars
somethingsecret

Any reason why the first object should retain the name of the destroyed var? I tried doing obj.clearvars(); and obj = ""; as well as the destroy. Doing obj = ""; is bad since it seems to create a TGraalVar object.

Any hints?

Twinny 05-21-2007 10:41 AM

No-one else had this problem? It seems the parent object maintains a pointer to a deleted child object. Kinda of annoying when i am debugging and such.

Twinny 07-13-2007 12:10 AM

Three posts in a row but this problem still exists!

HolySheepy 07-13-2007 11:40 AM

try obj = NULL; maybe?


All times are GMT +2. The time now is 04:31 AM.

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