Zero Posted September 20, 2011 Share Posted September 20, 2011 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. Quote Link to comment Share on other sites More sharing options...
edward Posted September 20, 2011 Share Posted September 20, 2011 Call setArg(0, NULL) Quote Link to comment Share on other sites More sharing options...
Zero Posted September 20, 2011 Author Share Posted September 20, 2011 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! Quote Link to comment Share on other sites More sharing options...
edward Posted September 20, 2011 Share Posted September 20, 2011 No, it will reuse whatever memory it already has reserved. Quote Link to comment Share on other sites More sharing options...
Zero Posted September 21, 2011 Author Share Posted September 21, 2011 No, it will reuse whatever memory it already has reserved. Thank you very much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.