Login Page - Create Account

Support Board


Date/Time: Mon, 10 Feb 2025 16:22:46 +0000



[Programming Help] - ASCIL: Setting SubGraphRef and the Lifetime of sc.Subgraph[] Arrays

View Count: 670

[2020-08-19 07:43:26]
BlakJak - Posts: 108
I have some code which stores an object for re-use using the GetPersistentPtr(). All that works fine and I have used it in many studies.

Recently I thought of adding members to the class as references to the Subgraphs for ease of access and readability in my code. However, it seems that those references when restored with a new call to the study (via GetPersistentPtr()) are pointing somewhere else as the [Subgraph].Name changes to garbage or "" (and eventually I get exceptions when writing data using those references).

What is the persistence of the Subgraph[] arrays in memory from call to call in the studies?

Should I be resetting my references with each new call to the study?

I am using pre-release 2154.
Date Time Of Last Edit: 2020-08-19 07:44:45
[2020-08-20 20:16:30]
Sierra Chart Engineering - Posts: 104368
Should I be resetting my references with each new call to the study?
Yes they cannot be remembered.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account