Login Page - Create Account

Support Board


Date/Time: Mon, 10 Mar 2025 20:23:45 +0000



Post From: Understanding Study/Price overlay memory usage

[2022-04-05 16:51:25]
jwick - Posts: 142
Gotcha thanks ... I'll re-work my code and see if that makes a difference. Also, two more questions, if I may ... 1) when using SCGraphData / calling GetStudyArraysFromChartUsingID(), is a copy of the data from the source chart made into the SCGraphData object or internally are pointers set to the data in the source chart and so no additional memory is used (other than for the pointers themselves)?

2) And a related question, is memory for a subgraph allocated only the first time it is used? So, all else equal, a study that only sets a value in Subgraphs[0] will use less memory than a subgraph that sets values within Subgraphs[0] till [20], for example? I ask this because the study I have in those destination charts (which currently make use of 42 subgraphs (and several Arrays within those subgraphs)) does use quite a bit of memory (in fact removing those studies seems to reduce memory consumption by nearly an equal amount as removing the study / price overlay studies pointing to the custom study). The custom study uses no persistent pointers (or any new memory allocations within) so my internal world of how things works makes sense (and why the study uses that much memory makes sense) if a studies subgraph occupies memory only if it is actually used.