Login Page - Create Account

Support Board


Date/Time: Sun, 16 Nov 2025 21:42:48 +0000



Post From: Persistent Variables Allocation?

[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,