Hi Evan,
That code was generated by our C# -> Java translator, and it is correct but not especially clear. It's not doing explicit memory management, but rather closing the interval that was opened on the first line. Here's some equivalent (but clearer) code:
PositionCesiumWriter interval = position.openInterval();
// use it
interval.close();
More background, if you're curious... In C#, we wrote this:
using (PositionCesiumWriter interval = position.OpenInterval())
{
// use it
}
This "using" construct guarantees that the interval is closed (by calling a method called Dispose) when execution leaves the block, even if it does so as a result of an exception. The try/finally you see in the Java version is the closest equivalent to that C# code. C# will call that Dispose method even if the static type it is used with does not implement IDisposable, but the runtime type does. DisposeHelper.dispose implements the same thing in Java.
Kevin