add Window.capture, Window.Sync, Scope smart_ptr for Shape and fix DTor bug.