Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT Doesn't Seem to release memory

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NT Doesn't Seem to release memory

    I am using various lists in my strategy - for tracking instruments and orders.

    I initialize these lists at the start of my strategy, and apply list.Clear() to them in the OnTermination block of my code, but it seems like they are never released from memory.

    This becomes a significant issue if I am performing optimizations, since the memory usage from NinjaTrader quickly escalates (To the point after ~1500 optimizations, it is using all of the 12GB of RAM that I have installed).

    Even if I close the strategy analyzer window, and only leave the main control center open (ie, I don't have any charts, etc open) this memory still isn't released. The memory usage from NT will stay at that elevated value (~12GB) until I close and restart the program.

    Is there something that I am missing here? MSDN says that the garbage collector should automatically clean up these lists after they're not needed any more, but it seems like NT is keeping them open for some reason.

    I would appreciate any advice on the matter....

    Thanks

    #2
    Originally posted by kbeary33 View Post
    I am using various lists in my strategy - for tracking instruments and orders.

    I initialize these lists at the start of my strategy, and apply list.Clear() to them in the OnTermination block of my code, but it seems like they are never released from memory.

    This becomes a significant issue if I am performing optimizations, since the memory usage from NinjaTrader quickly escalates (To the point after ~1500 optimizations, it is using all of the 12GB of RAM that I have installed).

    Even if I close the strategy analyzer window, and only leave the main control center open (ie, I don't have any charts, etc open) this memory still isn't released. The memory usage from NT will stay at that elevated value (~12GB) until I close and restart the program.

    Is there something that I am missing here? MSDN says that the garbage collector should automatically clean up these lists after they're not needed any more, but it seems like NT is keeping them open for some reason.

    I would appreciate any advice on the matter....

    Thanks
    Garbage collection is pretty much unpredictable. You may have to do what we are advised not to do, and explicitly call the Garbage Collector, or explicitly Finalize() the lists.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by techgetgame, Yesterday, 11:42 PM
    0 responses
    8 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Yesterday, 11:36 PM
    0 responses
    2 views
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,613 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Yesterday, 05:56 PM
    0 responses
    10 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    20 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X