reference_container

A bidirectional mapping of a pyobject and the d object associated to it. On the python side, these are weak references; we don't want to prevent python from reclaiming objects it is finished with. As such, on the D side, if you take PyObject*s out of here and store them for an extended time elsewhere, be sure to increment the reference count. On the D side, we have strong references, but that is incidental to the GC. If you stick d objects not allocated with the GC, there will probably be leaks. We use malloc for the container's structure because we can't use the GC inside a destructor and we need to use this container there.

template reference_container(Mapping)
@property
reference_container
()

Members

Aliases

Container
alias Container = MultiIndexContainer!(Mapping, IndexedBy!(HashedNonUnique!("a.d", "cast(size_t) *cast(const void**) &a"), "d", HashedUnique!("a.py", "cast(size_t) *cast(const void**) &a"), "python"), MallocAllocator, MutableView)
Undocumented in source.
Container
alias Container = MultiIndexContainer!(Mapping, IndexedBy!(HashedUnique!("a.d"), "d", HashedUnique!("a.py"), "python"), MallocAllocator, MutableView)
Undocumented in source.

Functions

clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

reference_container
reference_container [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_reference_container
Container _reference_container;
Undocumented in source.

Meta