Skip to content

Commit

Permalink
free allocated memory in x09 and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Apr 21, 2024
1 parent 1dd9b26 commit 92f36b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Demo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ my @demo = (
plcol0( 1 );
plstransform( undef, undef );
plflush();
plFree2dGrid($cgrid2);
]],

[act => q[
Expand Down Expand Up @@ -195,6 +196,7 @@ my @demo = (
plcol0 (1);
plline ($px , $py); # Plot the cylinder
plflush();
plFree2dGrid($cgrid2);
]],

[actnw => q|
Expand Down
4 changes: 2 additions & 2 deletions t/x09.pl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ sub polar {
plcol0 (1);
pllab ("", "", "Polar Contour Plot");

# plFree2dGrid ($cgrid2);
plFree2dGrid($cgrid2);
}

# Shielded potential contour plot example
Expand Down Expand Up @@ -211,7 +211,7 @@ sub potential {
plcol0 ($ncollab);
pllab ("", "", "Shielded potential of charges in a conducting sphere");

# plFree2dGrid ($cgrid2);
plFree2dGrid($cgrid2);
}

# main
Expand Down

0 comments on commit 92f36b9

Please sign in to comment.