TempVars lock & unlock

I’ve found some jme3 code in which
[java]TempVars vars = TempVars.get();
assert vars.lock();[/java]
Yet there is no lock()/unlock() in TempVars.java

How should it be resolved?
Code:
https://code.google.com/p/cave3d/source/browse/trunk/jme3/cave3d/TangentBinormalGenerator.java
Ctrl + F -> “vars.lock”

Isn’t it necessary to lock thread there anymore?

btw, can’t edit topics?

This code isn’t from the current engine, ask the developer.

It says it is for jme3. Every other file compiles, but this one.

And TmpVar is still here in current jme, but it doesn’t have lock / unlock anymore

I meant that this is not our code. You go TempVars.get() to get a new instance of temp variables and then have to call tempVars.release() to release them. Note that you should not use assert as in the code example itself, else the variables will only be released when you enable assertions.

@Neomex said: It says it is for jme3. Every other file compiles, but this one.

And TmpVar is still here in current jme, but it doesn’t have lock / unlock anymore

He means cave3d is not part of the core engine, but a plugin. So ask the plug in dev.
It was developed some times ago when tempVars has these method…the plugin is not maintened i think…

EDIT : Sorry, a bit too late, forgot to submit x)

It worked when commenting out lock() and changing unlock() for release(), otherwise it throws exceptions

… well I hope you also removed the assertion but anyway, its your app ^^

yup I did :slight_smile: