From db69351721d02376efd38c9971eebe6cfff87e5c Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 26 Mar 2003 02:31:13 +0000 Subject: [PATCH] Do a msvcrt.heapmin() during upkeep on Windows --- src/world.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/world.py b/src/world.py index e7d9d3838..0f8dbb4bf 100644 --- a/src/world.py +++ b/src/world.py @@ -31,6 +31,7 @@ from fix import * +import os import gc import time import copy @@ -38,6 +39,10 @@ import types import string import atexit import linecache +try: + import msvcrt +except ImportError: + pass import conf import debug @@ -75,6 +80,8 @@ except NameError: def upkeep(): # Function to be run on occasion to do upkeep stuff. gc.collect() + if os.name == 'nt': + msvcrt.heapmin() if gc.garbage: debug.debugMsg('Uncollectable garbge: %s' % gc.garbage, 'normal') if 'noflush' not in tempvars: