2 ms·
>So, the following code for i in range(100): print idevice_item_array[0] >actually crashes Python because it creates and destroys a hundred IDeviceIte
by dpark 14y ago
>So, the following code
for i in range(100):
print idevice_item_array[0]
>actually crashes Python because it creates and destroys a hundred IDeviceItem objects, resulting in a hundred calls to Release on the real COM object. After the first Release call, the COM object is considered deleted.
This doesn't sound like a "gotcha". It sounds like a huge bug that comtypes needs to address.