   [SlimDX] Disposing stateblock created by Effect.Begin()
  Hello, everyoneI'm writing a game engine, which is on a stage of effect system implementation, and I was stuck with such a problem:When using effects, application was not able to react correctly on events that cause device reset (INVALID CALL exception was called on an attempt of resetting the device even though absolutely no default-pool resources were used).After a small brainstorm I decided to debug the project on my laptop (I can't use unmanaged code debugging on Vista x64 :| ) and found an error "All stateblocks must be released before calling ResetDevice()".After some research I found out that effect.Begin(FX.None) creates some stateblock which it doesn't release :|. So my question is, what should I do to have no unreleased stateblocks before someone tries to resize a window with my-engine-driven game running inside? :)   
http://msdn.microsoft.com/en-us/library/bb205830(VS.85).aspxhttp://msdn.microsoft.com/en-us/library/bb205831(VS.85).aspxI think it is pretty self-explanatory.   ;  Hm, they should mention about those functions in Using Effects part of D3D SDK docs. Because I managed to completely miss them :)One last question then: should I call it for every effect I have when resetting a device?And thank you much for a quick reply! :)   ;  Yep, one time for each effect. OnLostDevice before the reset to release the resources, OnResetDevice after the reset to regain the resources.   ;  Tried it and it seems working in both windowed and fullscreen. Thanks again :)   