Login Page - Create Account

Support Board


Date/Time: Wed, 22 Jan 2025 04:35:41 +0000



A quick inquiry about the persistent pointers

View Count: 1015

[2018-09-02 20:03:27]
enemyspy - Posts: 306
I have a situation where I allocate orm-like objects to persistent pointer as interface with postgresql database. Mainly for bulk inserts/upserts of subgraph data. It gets flushed at last element of autoloop on new bar index.

So in most cases the size of allocated memory can shrink considerably once the reload and recalculate is complete and 90% of the data within the pointer is destroyed.

Therefor. I am wondering what happens if I call std::realloc() on a persistent pointer object. Would it be necessary to do anything with the persistent pointer functions after that?
Or would it be better to make a temp copy of the object, null the pointer and set it again on the temp copy?
[2018-09-03 03:33:31]
Sierra Chart Engineering - Posts: 104368
Just make sure the persistent pointer is being updated with the updated address returned by the reallocation function.
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