mirror of
https://github.com/Z3Prover/z3
synced 2025-06-07 14:43:23 +00:00
Dispose of intermediate Z3Objects created in dotnet api. (#5901)
* Dispose of intermediate Z3Objects created in dotnet api. * Set C# LangVersion to 8.0. * Fix build errors. * Fix warning about empty using statement. * Fix Xor to only dispose of objects that it creates internally.
This commit is contained in:
parent
bdf7de1703
commit
4e0a2f5968
13 changed files with 360 additions and 142 deletions
|
@ -203,8 +203,8 @@ namespace Microsoft.Z3
|
|||
/// <remarks>Essentially invokes the `simplify' tactic on the goal.</remarks>
|
||||
public Goal Simplify(Params p = null)
|
||||
{
|
||||
Tactic t = Context.MkTactic("simplify");
|
||||
ApplyResult res = t.Apply(this, p);
|
||||
using Tactic t = Context.MkTactic("simplify");
|
||||
using ApplyResult res = t.Apply(this, p);
|
||||
|
||||
if (res.NumSubgoals == 0)
|
||||
throw new Z3Exception("No subgoals");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue