Jump to content

Unigine:Ptr thread safety


photo

Recommended Posts

Hi,

Am I right to assume that Unigine::Ptr operations are not thread safe (looks that way)?

For example:

Unigine::TexturePtr tex;

thread 1:

someFunctionCall(tex);

do something with tex there.

thread 2:

tex = Unigine::TexturePtr(nullptr); or just assign another pointer.

I think thread 1 can end up with incorrect tex pointer at one point (partially destroyed).

So everytime I access a pointer I should lock / unlock around it?

Kind Regards,

Adrian Licu

Link to comment
×
×
  • Create New...