CondorLang / Condor

A fast, simple, and intelligent new programming language
BSD 3-Clause "New" or "Revised" License
34 stars 11 forks source link

Garbage Collection in For Loop #14

Open chaseWillden opened 7 years ago

chaseWillden commented 7 years ago

The following code does not increase memory:

for (int i = 0; i < 100; i++) var a = 10;

The memory is under control, meaning, the garbage collector is cleaning this properly. However, when I run the following code:

for (int i = 0; i < 100; i++) var a = 10 + 10;

The memory nearly doubles. The garbage collection is not occurring here. Here is a starting place

To replicate the issue:

  1. Open System Monitor/Activity Monitor
  2. Run ./build/condor
  3. Check if Condor is a task on the activity monitor
  4. run the two code examples above