This is winehq bug 56859. I had been thinking about fixing this but in a different way. We shouldn't be holding a reference to the table (via query->view) from the enumerator object. We can instead create a list of class objects and copy data from the table view using the record structure. That also simplifies the class object implementation.