05-29-2026 01:21 AM
cffi library. Memory allocation occurs before passing the inputs to the DLL, and resizing happens after the DLL processing completes. Both operations are handled within the Python script using LabVIEW's internal Array Resize function.
DSDisposeHandle (DeAllocate) function instead, it caused a crash, which is why I reverted to using the Resize function with a size of 0. I am using LabVIEW 2021 SP1 (64-bit). I want to understand why resizing to 0 fails. Is this behavior intended by design in the LabVIEW memory manager, or am I implementing it incorrectly?05-29-2026 01:31 AM - edited 05-29-2026 01:31 AM
Hi Dhatshayini,
@Dhatshayini wrote:
am I implementing it incorrectly?
How exactly did you implement "it"? Mind to share some code?
The ReshapeArray works as expected in LabVIEW:

05-29-2026 06:35 AM - edited 05-29-2026 06:59 AM
You need to show what you did. Memory management of LabVIEW data is not just something you can vibe code. This listens very closely and there is more to it than just calling some function randomly.
@Dhatshayini wrote:
I want to understand why resizing to 0 fails. Is this behavior intended by design in the LabVIEW memory manager, or am I implementing it incorrectly?
YES the LabVIEW Memory Manager definitely can do this and YES you are implementing something wrong. But without looking at the actual code both for your LabVIEW DLL and the Python FFI interface, we can only say these two things.
05-29-2026 10:21 AM - edited 05-29-2026 10:27 AM
@Dhatshayini wrote:
I am working with a LabVIEW-Python interface, using a LabVIEW DLL to perform operations called from Python via thecffilibrary. Memory allocation occurs before passing the inputs to the DLL, and resizing happens after the DLL processing completes. Both operations are handled within the Python script using LabVIEW's internalArray Resizefunction.
It is not clear at all how your code is layered and what happens where. What parts are graphical and what parts are text based?
So you have a DLL built in LabVIEW that you call from python. At the same time, you give conflicting information where the "resizing" happens (inside the DLL as a last step after processing? After the dll in the calling code?). Does the DLL have python nodes? Is the caller again a LabVIEW program using a python node? Something else?
As has been said, there is no "internal" (sic) LabVIEW resize function, (except for "matrix resize") just "reshape array" (which can also do other things (trim, pad, change number of dimensions, etc).
What's the logical purpose of the resizing?