The simple-finalizer Reference Manual

This is the simple-finalizer Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:42:18 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 simple-finalizer

A simple Common Lisp finalizer for foreign objects when using CFFI and TRIVIAL-GARBAGE.

Maintainer

Luke Crook <>

Author

Luke Crook <>

License

BSD

Version

0.1

Dependencies
  • cffi (system).
  • trivial-garbage (system).
Source

simple-finalizer.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 simple-finalizer/simple-finalizer.asd

Source

simple-finalizer.asd.

Parent Component

simple-finalizer (system).

ASDF Systems

simple-finalizer.

Packages

simple-finalizer-system.


3.1.2 simple-finalizer/package.lisp

Source

simple-finalizer.asd.

Parent Component

simple-finalizer (system).

Packages

simple-finalizer.


3.1.3 simple-finalizer/simple-finalizer.lisp

Dependency

package.lisp (file).

Source

simple-finalizer.asd.

Parent Component

simple-finalizer (system).

Public Interface
Internals

simple-free (function).


4 Packages

Packages are listed by definition order.


4.1 simple-finalizer

Source

package.lisp.

Nickname

simfin

Use List

common-lisp.

Public Interface
Internals

simple-free (function).


4.2 simple-finalizer-system

Source

simple-finalizer.asd.

Use List
  • asdf/interface.
  • common-lisp.

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Generic functions

Generic Reader: fp (object)
Package

simple-finalizer.

Methods
Reader Method: fp ((foreign-object foreign-object))

Returns the foreign object reference.

Source

simple-finalizer.lisp.

Target Slot

foreign-pointer-to-object.

Generic Function: free (foreign-object)

An explicit cleanup method. When freed, ‘GC-P‘ will be NIL.

Package

simple-finalizer.

Source

simple-finalizer.lisp.

Methods
Method: free ((self foreign-object))
Generic Function: free-p (foreign-object)

Returns ‘T if the foreign object was previously deleted using ‘FREE‘.

Package

simple-finalizer.

Source

simple-finalizer.lisp.

Methods
Method: free-p ((self foreign-object))
Generic Reader: gc-p (object)
Package

simple-finalizer.

Methods
Reader Method: gc-p ((foreign-object foreign-object))

Returns ‘T‘ if the foreign object will be finalized.

Source

simple-finalizer.lisp.

Target Slot

garbage-collect.

Generic Function: (setf gc-p) (foreign-object)

Enables or disables finalization.

Package

simple-finalizer.

Source

simple-finalizer.lisp.

Methods
Method: (setf gc-p) ((self foreign-object))
Generic Function: this-fp (foreign-object)

Returns the foreign object reference. This method may not be redefined by a subclass.

Package

simple-finalizer.

Source

simple-finalizer.lisp.

Methods
Method: this-fp ((self foreign-object))

5.1.2 Standalone methods

Method: initialize-instance :around ((self foreign-object) &key &allow-other-keys)
Source

simple-finalizer.lisp.


5.1.3 Classes

Class: foreign-object

A wrapper around the foreign object stored in ‘FP‘.
Finalizes the foreign object using the function in ‘:FREE‘ when ‘GC-P‘ is ‘T‘ when the wrapper is garbage collected. The foreign object is explicitely freed by calling ‘FREE‘.

Package

simple-finalizer.

Source

simple-finalizer.lisp.

Direct methods
Direct slots
Slot: foreign-pointer-to-object

Returns the foreign object reference.

Initform

(error ":fp must not be nil.")

Initargs

:fp

Readers

fp.

Writers

This slot is read-only.

Slot: garbage-collect

Returns ‘T‘ if the foreign object will be finalized.

Initform

t

Initargs

:gc

Readers

gc-p.

Writers

This slot is read-only.

Slot: free-function
Initform

(function cffi-sys:foreign-free)

Initargs

:free


5.2 Internals


5.2.1 Ordinary functions

Function: simple-free (func-fp type)
Package

simple-finalizer.

Source

simple-finalizer.lisp.


Appendix A Indexes


A.1 Concepts