Skip to content

Commit

Permalink
In this branch SymmetricGroup([1..5]) is cached, and so does not
Browse files Browse the repository at this point in the history
get garbage collected. Use a differnet group.
  • Loading branch information
stevelinton committed Feb 16, 2016
1 parent f7f772a commit de7e04c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tst/teststandard/weakptr.tst
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ gap> START_TEST("weakptr.tst");
#
# Low level access functions
#
gap> w := WeakPointerObj([1,,2^40*10^10,Z(17),[2,3,4],fail,SymmetricGroup(5),]);;
gap> w := WeakPointerObj([1,,2^40*10^10,Z(17),[2,3,4],fail,Group((1,2,3,4,5),(1,2))]);;
gap> Print(w,"\n");
WeakPointerObj( [ 1, , 10995116277760000000000, Z(17),
[ 2, 3, 4 ], fail, SymmetricGroup( [ 1 .. 5 ] ) ] )
[ 2, 3, 4 ], fail, Group( [ (1,2,3,4,5), (1,2) ] ) ] )
gap> LengthWPObj(w);
7
gap> List([1..7],x->IsBoundElmWPObj(w,x));
[ true, false, true, true, true, true, true ]
gap> List([1..7],x->ElmWPObj(w,x));
[ 1, fail, 10995116277760000000000, Z(17), [ 2, 3, 4 ], fail,
Sym( [ 1 .. 5 ] ) ]
Group([ (1,2,3,4,5), (1,2) ]) ]
gap> SetElmWPObj(w,9,[]);
gap> Print(w,"\n");
WeakPointerObj( [ 1, , 10995116277760000000000, Z(17),
[ 2, 3, 4 ], fail, SymmetricGroup( [ 1 .. 5 ] ), , [ ] ] )
[ 2, 3, 4 ], fail, Group( [ (1,2,3,4,5), (1,2) ] ), , [ ] ] )
gap> UnbindElmWPObj(w,4);
gap> Print(w,"\n");
WeakPointerObj( [ 1, , 10995116277760000000000, ,
[ 2, 3, 4 ], fail, SymmetricGroup( [ 1 .. 5 ] ), , [ ] ] )
WeakPointerObj( [ 1, , 10995116277760000000000, , [ 2, 3, 4 ], fail, Group(
[ (1,2,3,4,5), (1,2) ] ), , [ ] ] )
gap> UnbindElmWPObj(w,9); LengthWPObj(w);
7
gap> 1;;2;;3;;
Expand Down

0 comments on commit de7e04c

Please sign in to comment.