automatic function call after closing block

Saaa empty at needmail.com
Sat Sep 20 09:24:18 PDT 2008


Ah, that's at least nicer, but I meant that I somehow change texture.bind() 
to include texture.unbind()

class texture
{
public void bind()
{
    ..
    underlying scope(exit) texture.unbind()
}

private void unbind()
{
    ..
}

}


..
texture.bind()
{
    ..
}
..


>
> Yep!
>
> texture.bind()
> {
>    scope(exit) texture.unbind()
>    ...
> } 




More information about the Digitalmars-d-learn mailing list