Skip to content

Instantly share code, notes, and snippets.

View haxtibal's full-sized avatar

Tobias Deiminger haxtibal

  • Regensburg, Germany
View GitHub Profile
@haxtibal
haxtibal / testleak.psm1
Created March 22, 2022 14:28
Try to reproduce memory leak as in icinga-powershell-framework
# Add this file as module to your PSModulePath, call Test-Leak in an interactive PS session,
# and watch the managed heap size in a debugger session
$Global:Vars = [hashtable]::Synchronized(@{});
$Global:Vars.Add('WorkerQueues', @{});
function Producer {
param (
$ThreadId = 0
)
@haxtibal
haxtibal / custom_objectify.py
Last active March 8, 2022 00:59
Experiments with lxml: Combine custom class lookup and objectify magic
"""Some experiments on how we can combine custom class lookup with lxml.objectify."""
from enum import Enum
from io import StringIO
from lxml import etree, objectify
from typing import Union
class MyEnum(Enum):
"""Can we associate this pure python type with a specific XML element <myEnumValue>?
@haxtibal
haxtibal / lib.rs
Created January 27, 2019 18:57
Use crate lyon_tessellation to triangulate a 3D volume
extern crate lyon_tessellation;
#[cfg(test)]
mod tests {
use lyon_tessellation::{FillError, FillOptions, FillTessellator, FillVertex};
use lyon_tessellation::path::builder::{FlatPathBuilder,PolygonBuilder};
use lyon_tessellation::path::default::Path;
use lyon_tessellation::geometry_builder::{BuffersBuilder,VertexBuffers};
use lyon_tessellation::geom::euclid::{Point2D, Point3D};
diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 15c86a05..8cbeb6a5 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -1565,40 +1565,54 @@ void Annot::incRefCnt() {
annotLocker();
refCnt++;
}
void Annot::decRefCnt() {