IParticleObjectExt interface with tyFlow returns bones but not a skin
#10
The vector of tyInstanceInfo contains
- a vector of tyInstance, that contains
-- vector of Matrix3
-- vector of tyParticleUVWInfo

deleting of memory block for arrays of Metrix3 or tyParticleUVWInfo is OK.
deleting of memory block for arrays of tyInstance or tyInstanceInfo results in crash.

both Matrix3 and tyParticleUVWInfo are simple structs without complex destructor, so arrays for them do not need to keep a size of array at beginning of memory block. This causes in no shift during memory free.

The arrays for tyInstance and tyInstanceInfo must keep size in beginning of memory block because both classes are complex with destructors. This causes in 8 byte shift during memory free.
Freeing of arrays can be done in different ways and this depends on version of VC tools.

There would be good to add
void tyFreeInstances(tyVector*) = 0;
in addition to
tyVector* tyCollectInstances() = 0;

so tyFlow would delete memory using same VC tools as for allocation.
  Reply


Messages In This Thread
RE: IParticleObjectExt interface with tyFlow returns bones but not a skin - by DaliRenderer - 03-01-2024, 01:14 PM

Forum Jump: