[Python-Dev] Not able to do unregister a code

M.-A. Lemburg mal at egenix.com
Thu Sep 15 09:34:20 CEST 2011


Jai Sharma wrote:
> Hi,
> 
> I am facing a memory leaking issue with codecs. I make my own ABC class and
> register it with codes.
> 
> import codecs
> codecs.register(ABC)
> 
> but I am not able to remove ABC from memory. Is there any alternative to do
> that.

The ABC codec search function gets added to the codec registry search
path list which currently cannot be accessed directly.

There is no API to unregister a codec search function, since deregistration
would break the codec cache used by the registry to speedup codec
lookup.

Why would you want to unregister a codec search function ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Sep 15 2011)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2011-10-04: PyCon DE 2011, Leipzig, Germany                19 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list