Creating thread in python rewrites another structure
class MyThread (threading.Thread):
def __init__(self, window):
library.test_print()
self.window = window
threading.Thread.__init__(self)
library.test_print()
I don't suppose there is bug in Python (or is there?) but i don't see what could I be possibly doing wrong. Do you have any ideas?
I figured it out. The problem was I didn't make defense copy of the string when storing it into char* in my structure and python had no problem overwriting that very memory space with another string although my pointer was still pointing to it. Thanks for your time everyone.
精彩评论