Epicor Function

Hello Guys,
with Kinetic upgraded, I got the following error in epicor function.
warning CA2000: Call System.IDisposable.Dispose on object created by ‘Ice.Services.ContextFactory.CreateContext()’ before all references to it are out of scope

below is my call.

Please let me know how to fix this issue.

thanks,
Eddy

var context = Ice.Services.ContextFactory.CreateContext();

using(var so = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.CustShipSvcContract>(context))
{

}

it seems this function has issue now.
var context = Ice.Services.ContextFactory.CreateContext();

I figured it out now.
i have to use using

You don’t have to, but in general it’s good practice.

On those occasions where you don’t, or if it doesn’t make sense, then
you must manually dispose of the object. (But don’t do both.)

context.Dispose();

Also, is there a reason you are making your own context in a function?
Nine times out of ten, you don’t need to do that.