Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-20 Thread Valery Kotov
gt; store a pointer to your QVector in the heap object. Heap::QQmlSequence does >>> that, for example. Just make sure to use V4_NEEDS_DESTROY and provide a >>> destroy() function to delete the vector. >>> >>> I'd probably go for the first approach with perhap

Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-20 Thread Lars Knoll
es to the JS heap. If your array has only references to the C heap, then you're probably better off using a pointer to a regular vector. Simon From: Development mailto:qt...@qt-project.org>> on behalf of Valery Kotov mailto:kotov.val...@gmail.co

Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-15 Thread Valery Kotov
ct type >> (similar to how Object has MemberData) if the array contains references to >> the JS heap. If your array has only references to the C heap, then you're >> probably better off using a pointer to a regular vector. >> >> >> Simon >> >> -

Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-08 Thread Valery Kotov
references to > the JS heap. If your array has only references to the C heap, then you're > probably better off using a pointer to a regular vector. > > > Simon > > -- > *From:* Development qt...@qt-project.org> on behalf of Valery Kotov &

Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-08 Thread Lars Knoll
Hi Valery, > On 8 Aug 2018, at 09:10, Valery Kotov wrote: > > Hello all, > > I have a question about QV4 heap objects and what could be stored in them. > I would like to move data structure from c++ heap to GC heap. Unfortunately, > my data structure stores a pair of QLists internally. > As fa

Re: [Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-08 Thread Simon Hausmann
development mailing list Subject: [Development] Storing and managing ValueArray inside QV4::Heap objects Hello all, I have a question about QV4 heap objects and what could be stored in them. I would like to move data structure from c++ heap to GC heap. Unfortunately, my data structure stores a

[Development] Storing and managing ValueArray inside QV4::Heap objects

2018-08-08 Thread Valery Kotov
Hello all, I have a question about QV4 heap objects and what could be stored in them. I would like to move data structure from c++ heap to GC heap. Unfortunately, my data structure stores a pair of QLists internally. As far as I'm aware, QV4::Heap objects should be "trivially constructible", and t