summaryrefslogtreecommitdiff
path: root/public/java-segfault.md
diff options
context:
space:
mode:
Diffstat (limited to 'public/java-segfault.md')
-rw-r--r--public/java-segfault.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/public/java-segfault.md b/public/java-segfault.md
index 295ef48..7a2d4c3 100644
--- a/public/java-segfault.md
+++ b/public/java-segfault.md
@@ -91,7 +91,7 @@ like:
// `this` may now be garbage collected
return child.somethingElse(var); // segfault comes here
}
-
+
Where the destructor method of `this` calls a method that will
`free()` native memory that is also accessed by `child`; if `this` is
garbage collected before `child.somethingElse()` runs, the backing
@@ -111,7 +111,7 @@ around until after we were also done with `child`:
this.getSize(); // bogus call to keep `this` around
return ret;
}
-
+
Yeah. After spending weeks wading through though thousands of lines
of Java, C, and C++, a bogus call to a method I didn't care about was
the fix.