We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e2f4d31 + c4541d5 commit 5349e50Copy full SHA for 5349e50
ocl.py
@@ -535,7 +535,11 @@ def union(s,t) :
535
def unionSequence(s,t) :
536
res = []
537
res.extend(s)
538
- res.extend(t)
+
539
+ # Add all elements of t that are not in s (Prevents duplicates)
540
+ new_res = [x for x in t if x not in s]
541
+ res.extend(new_res)
542
543
return res
544
545
oclfile.py
@@ -4,13 +4,24 @@
4
import pickle
5
import socket
6
import tempfile
7
+import gc
8
9
10
from enum import Enum
11
12
13
def free(x):
14
del x
15
16
+ # Garbage Collection
17
+ try:
18
+ gc.collect()
19
+ except Exception as e:
20
+ pass
21
+ else:
22
23
24
25
26
class OclFile:
27
oclfile_instances = []
0 commit comments