IParticleObjectExt interface with tyFlow returns bones but not a skin
#9
I will try Release now within few minutes, but previously, there was no difference.
The reason is clear, I have seen this already in other projects. The memory block was allocated with one version of CRT, but is deallocating with different version.
See the picture. Starting from some version of tools, Microsoft VC adds 8 bytes for arrays, allocated with new[]. So pointer to array itself is shifted by 8 bytes comparing to memory block. 
What is the version of VC, Windows SDK used for tyFlow ?

[Image: b1.png]

To prevent from this issue, I use declarations like this:

class iMyPublicClass
{
protected:
  virtual ~iMyPublicClass() {} // prevent from direct calls

public:
  virtual size_t AddRef() = 0;
  virtual size_t Release() = 0;      // use this call to release object

public:
  // functionality
};


So allocating and deallocating will be in same place (library) using same memory manager.

In Release it passes wrong pointer also, but memory manager does not crash. It just ignores this memory block and leaks it.

BTW, _T("renderer") do not help. It still returns bones instead of skin. Something goes wrong.
  Reply


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

Forum Jump: