Login Page - Create Account

Support Board


Date/Time: Wed, 22 Jan 2025 06:54:12 +0000



Post From: A quick inquiry about the persistent pointers

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