Login Page - Create Account

Support Board


Date/Time: Sun, 16 Nov 2025 19:33:12 +0000



Persistent Variables Allocation?

View Count: 135

[2025-10-25 11:43:42]
skalaydzhiyski - Posts: 96
Hi SC,

I was wondering -> are persistent variables always allocated on the heap ? or just persistent pointers ?

My use case is storing a long list of dates and my current approach is to have a persistent vector<scdatetime>*.
Also I have a lot of dereferencing operations in my study for the persistent vector.

If persistentvars are usually allocated on the stack maybe it's worth refactoring my solution to instead have a list if indices and lots of persistent SCDateTime&'s if I wanted to squeeze max performance out of my study.

I am not sure if this is classified as "programming help", but would love to know.

All the best,
[2025-10-26 18:46:03]
Sierra_Chart Engineering - Posts: 21435
Yes, they have to be on the memory heap.
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, use 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