upvote
It's always difficult to have GC and non-GC objects interact seamlessly. You have to allow GC object finalizers to drop non-GC data, and non-GC objects to register GC objects they might reference as temporary roots (keep them alive) or somehow allow the GC tracing pass to discover what they might be referencing. And you still can't involve non-GC objects in any cycles, they have to be neatly self-contained leaf-like or tree-like sections of your reference graph.
reply
Depends if the language supports value types and stack allocation or not.

Many GC languages do so.

The hard part is that the difference is part of the type system, and you might need to refactor some code moving between value and reference types.

reply