Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After delete SimObject, the memory is still not free all. #370

Open
kynora opened this issue Oct 6, 2016 · 1 comment
Open

After delete SimObject, the memory is still not free all. #370

kynora opened this issue Oct 6, 2016 · 1 comment

Comments

@kynora
Copy link
Contributor

kynora commented Oct 6, 2016

I try to run simulate create 100000 SimObjects. Each object have fields value.
All object consume about 40 mb of memory, after delete all objects. only 30mb are free and still remaining about 10mb.
Are those fields values still keep in memory?

new SimGroup(NewPointerGroup);
function SimulateNewPointer(%max)
{
   if (%max $= "")
      NewPointerGroup.deleteObjects();
   else
   {
      for (%i =0; %i < %max; %i++)
      {
         %obj = new SimObject()
         {
            value1 = 123456;
            value2 = 678901;
            value3 = "sjldfljkskjldfjksdfkjlskfljsdkjlfsdkjlfsdfj slfjslkdfs";
         };
         NewPointerGroup.add(%obj);
      }
   }
}
@greenfire27
Copy link
Contributor

The engine uses a global string table. I can't be sure without checking, but I would bet that table is still holding a reference to your three values. Really the global table is a relic of the past and needs to be replaced.

It is also possible that something else is happening. We would need to investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants