🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
AddScriptSection version that doesn't copy the string
Is it possible to have a variant of asIScriptEngine::AddScriptSection (maybe AddScriptSectionPointer) that doesn't do a copy of the code string? Since all my calling code already keep the original source memory alive (for other domestic purposes) it is a waste of time and space to make another copy. With this new call it is the caller responsability to keep the memory allocated during module lifetime.
Thanks
Licu
After the Build() method completes the code strings are freed, so the extra memory allocations are only temporary.
I could make the AddScriptSection() method take an extra method to tell the library that the application will be responsible for holding the memory. Thanks for the suggestion.
I could make the AddScriptSection() method take an extra method to tell the library that the application will be responsible for holding the memory. Thanks for the suggestion.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement