#NEWLINE# def testGLResourceDestruction( self ) : #NEWLINE# #INDENT# s = Gaffer . ScriptNode ( ) #NEWLINE# s [ 'p' ] = GafferScene . Plane ( ) #NEWLINE# s [ 'g' ] = GafferScene . Group ( ) #NEWLINE# s [ 'g' ] [ 'in' ] [ 0 ] . setInput ( s [ 'p' ] [ 'out' ] ) #NEWLINE# s [ 'g' ] [ 'in' ] [ 1 ] . setInput ( s [ 'p' ] [ 'out' ] ) #NEWLINE# s [ 'g' ] [ 'in' ] [ 2 ] . setInput ( s [ 'p' ] [ 'out' ] ) #NEWLINE# s [ 'g' ] [ 'in' ] [ 3 ] . setInput ( s [ 'p' ] [ 'out' ] ) #NEWLINE# sg = GafferSceneUI . SceneGadget ( ) #NEWLINE# sg . setScene ( s [ 'g' ] [ 'out' ] ) #NEWLINE# sg . setMinimumExpansionDepth ( 2 ) #NEWLINE# with GafferUI . Window ( ) as w : #NEWLINE# #INDENT# gw = GafferUI . GadgetWidget ( w ) #NEWLINE# #UNINDENT# w . setVisible ( True ) #NEWLINE# IECoreGL . CachedConverter . defaultCachedConverter ( ) . setMaxMemory ( 100 ) #NEWLINE# for i in range ( 1 , 1000 ) : #NEWLINE# #INDENT# s [ 'p' ] [ 'dimensions' ] [ 'x' ] . setValue ( i ) #NEWLINE# self . waitForIdle ( 10 )