db3108 / michi-c2

Michi-c2 --- development version for michi-c
25 stars 9 forks source link

Pass address of pointer variable 'tree' to gtp_clear_board() #14

Closed traveller42 closed 8 years ago

traveller42 commented 8 years ago

The TreeNode* variable needs to be passed by reference as the pointer to the new TreeNode object created in gtp_clear_board() needs to be available outside of this function. Fixes #12

traveller42 commented 8 years ago

The reason this is working on Linux is that the new object is getting created at the same address as the old object. The address is different each run, but repeats for each clear_board in the same run.

Apparently, OSX is allocating a different address each time memory is allocated within the same run.