asSetGlobalMemoryFunctions thread cleanup

Started by
2 comments, last by cvet 9 years, 1 month ago

Hello.

I think better place asThreadCleanup in asSetGlobalMemoryFunctions, because now we can allocate thread memory with one allocator, but deallocate with other.

For now asThreadCleanup placed only in asResetGlobalMemoryFunctions.

I encounter this error and take some hours to find what happening, better to avoid this situations for others.

Or at least need place notice in function description about this behaviour.

Advertisement

I'm afraid I may not understand you perfectly.

Can you perhaps give a step by step description of what you did in your application and where it caused problems?

Did you call asSetGlobalMemoryFunctions more than once in your application from different threads?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Was it this you suggested that I should do?

Svn diff revision 2117.

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Yes, that what I mean - add asThreadCleanup in asSetGlobalMemoryFunctions.

For example string in TLS can be allocated with release userAlloc, but deleted with debug userFree.

For now string clean-upped before memory functions changed and this problem not happens.

Thanks.

This topic is closed to new replies.

Advertisement