glfw memory leak test

1. glfwInit () and glfwTerminate () on the main thread 

   1 cycles of memory 14M

  100 46M cycles

  1000 49M cycles

 

2. glfwInit () and glfwTerminate () on the thread globalInit and globalRelease    

   1 cycles of memory 13M

  100 87M cycles

  Cycles 1000 426M

 

3. glfwInit () and glfwTerminate () on the thread but initialized only once

   1 memory cycles  

  100 cycles   

  1000 cycles  

 

4. glfwInit () and glfwTerminate () on the thread each time initialization, createWindow open

   1 cycles of memory 14M

  100 cycles memory 89M

  1000 cycles memory 458M

 

5. On the basis of the step run open

   1 cycles of memory 14M

  100 cycles memory 62M

  1000 cycles memory 453M

 

6. In the last step global initialized only once comments closeDll

   Cycles 1 87 M

  2 cycles  crash  described later closeDll data is destroyed error: 0X10001: The GLFW library is not initialized

 

7. On the basis of global initialization step in to write thread, and each time initialization  is not used closeDll

   1 cycles of memory 17M

  100 cycles memory 65M

  1000 cycles memory 436M

 

8.   In the last step in the global write external use closeDll ------> recommended

   1 cycles of memory 15M

  100 cycles memory 54M

  1000 cycles memory 55M

 

 

9 transcoder call so @ 8  

   1 cycles of memory 119M

  100 cycles memory 382M

  1000 cycles memory 528M

Guess you like

Origin www.cnblogs.com/luoyinjie/p/11715596.html