Both Entity Framework 6 and Entity Framework Core when accessed as shown below
using (var context = new NorthwindContext())
{
var customers = context.Customers.ToList();
}
.
Or with .NET Core 5/C#9 and higher
using var context = new NorthwindContext();
var customers = context.Customers.ToList();
Will dispose of any scoped objects. Now if say your DbContext is scoped private in a class you need to dispose of it else if the app closes it will then dispose of it's resources.
Best practice is to wrap your code for EF in a using statement.
There are fringe cases were developer believed they had memory leakage yet usually a code rewrite resolve these issues.
Also, unless there is a compelling reason to use EF 6 consider moving to EF Core which has many improvements. Consider EF Core 6 which is a RC and due for proper release the second week of November of this year.