Regular API function

simReleaseScriptRawBuffer

Description Removes (destroys) a script's raw buffer. All raw buffers are automatically released at the end of a simulation, but depending on the extent of use of the raw buffers, it might be a good idea to release them when not needed anymore. See also simGetScriptRawBuffer and simSetScriptRawBuffer.
C synopsis simInt simReleaseScriptRawBuffer(simInt scriptHandle,simInt bufferHandle)
C parameters
scriptHandle: handle of the script. Can be sim_handle_main_script or sim_handle_all (in that case the bufferHandle is automatically also sim_handle_all)
bufferHandle: handle of the raw buffer or sim_handle_all to release all raw buffers of the given script
C return value
-1 if operation was not successful (an unexisting buffer will not trigger an error). In a future release, a more differentiated return value might be available
Lua synopsis number result=simReleaseScriptRawBuffer(number scriptHandle,number bufferHandle)
Lua parameters
scriptHandle: handle of the script. Can be sim_handle_main_script, sim_handle_self, or sim_handle_all, sim_handle_tree and sim_handle_chain (in the last 3 cases the bufferHandle is automatically also sim_handle_all). With sim_handle_tree or sim_handle_chain, the calling script is not included.
bufferHandle: handle of the raw buffer or sim_handle_all to release all raw buffers of the given script
Lua return values
Same as C-function

All regular API functions on one page