Jump to content

How to clear out a UT_WorkArgs object


Zero

Recommended Posts

Hello,

I can't figure this out from the API docs, so I'm hoping someone here knows the trick. In an attempt of being efficient, I want to re-use a UT_WorkArgs instance for multiple tasks, but to do that, I need to "clear out" the items in it. How can I do that? There is a

void UT_WorkArgs::operator delete(void * memory)

method, but I don't know what it really does and what parameter it expects. Any help would be appreciated.

Cheers.

Link to comment
Share on other sites

Call setArg(0, NULL)

Thank you! That does indeed work. Do you happen to know what this does internally? Does the UT_WorkArgs instance free up any internal memory related to the past arguments it might have allocated? I am going to use this instance to iterate over a lot of data and I want to avoid any memory leaks.

Thanks again!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...