Am Donnerstag, 22. Mai 2008 19:17:34 schrieb Jens Albretsen:
Well, as remember this the normal procedure of d3d, textures, surfaces and streams is to hold on to ddraw/d3d until everything is destroyed or the process is terminated.
DirectDraw 7 does this, but DirectDraw (1) doesn't
Anyway I thought that the idea about fixing regressions is to fix them for 1.0?
Yes, but we can't fix them in an incorrect way. What happens to fix one app could break other apps
Ehh, where? I see no test doing the following
- DirectDrawCreate
- CreateSurface
- Release DirectDrawObject from 1
- Use the surface
- Release surface to release ddraw
I think I once wrote a test that does this: DirectDrawCreate CreateSurface DirectDraw_AddRef ref = DirectDraw_Release ok(ref == 1)
of course even if CreateSurface doesn't addref the publically visible refcount, it could still hold some internal reference to prevent the ddraw object from beeing destroyed. If that's the case, we need an additional test showing that the ddraw object survives even though it has ref 0