The object will be unloaded from GPU and CPU memory if there's no further reference in your code to it. In this example, setting it to null should do it unless there's some others reference to it. You can skip these clear....-methods though. They are just resetting the matrix.