A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/027125.html below:

[Python-Dev] pre-PEP: The Safe Buffer Interface

[Python-Dev] pre-PEP: The Safe Buffer Interface [Python-Dev] pre-PEP: The Safe Buffer InterfaceNeil Hodgson nhodgson@bigpond.net.au
Wed, 31 Jul 2002 12:12:31 +1000
Thomas Heller:

> In plain text:
> Provide a method which returns a 'view' into your object's
> buffer after locking the object. The view holds a reference
> to object, the objects is unlocked and decref'd when the
> view is destroyed.

   Yes, this handles the situation. However I see some problems here:
1 Explicit resource release, such as closing files, is easier to understand
and debug than implicit ref-count exhaustion.
2 On platforms such as .NET and the JVM, the view object will live for an
indeterminate time, prohibiting resizes until the VM decides to garbage
collect. While the JVM can not return pointers, and so may seem to not be a
candidate for this interface, it can return array references.
3 More complex implementation requiring a secondary view object.

   Neil





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4