Commit 38b3f37
committed
Try using the managed GC bridge.
dotnet publish --self-contained -p:UseMonoRuntime=true -p:DotNetTargetFramework=net8.0 -p:UseAppHost=true -p:ErrorOnDuplicatePublishOutputFiles=false samples/Hello-Java.Base/Hello-Java.Base.csproj -r osx-x64 && \
JAVA_INTEROP_GREF_LOG=g.txt ./samples/Hello-Java.Base/bin/Release/osx-x64/publish/Hello-Java.Base
Does it work? No quite.
What's present here "works", in that the managed `MarkCrossReferences`
callback *is* invoked, which just keeps all instances alive.
However, it *doesn't* fully work, for reasons I don't understand:
if `MarkCrossReferences` calls managed code, e.g.
`Console.WriteLine("here!")`, then it *hangs*.
Looks like this prototype approach can't work.1 parent a648d78 commit 38b3f37
File tree
2 files changed
+8
-1
lines changed- src
- Java.Runtime.Environment/Java.Interop
- java-interop
2 files changed
+8
-1
lines changedLines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1288 | 1288 | | |
1289 | 1289 | | |
1290 | 1290 | | |
| 1291 | + | |
1291 | 1292 | | |
1292 | 1293 | | |
1293 | 1294 | | |
| |||
1317 | 1318 | | |
1318 | 1319 | | |
1319 | 1320 | | |
| 1321 | + | |
1320 | 1322 | | |
1321 | 1323 | | |
1322 | 1324 | | |
1323 | 1325 | | |
1324 | 1326 | | |
1325 | 1327 | | |
| 1328 | + | |
1326 | 1329 | | |
1327 | 1330 | | |
1328 | 1331 | | |
| |||
0 commit comments