Skip to content

Commit 1ef6694

Browse files
zlt2000Copilot
andauthored
Update examples/documentation/src/main/java/com/alibaba/cloud/ai/examples/documentation/framework/tutorials/SkillExample.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent b96e7e0 commit 1ef6694

File tree

1 file changed

+6
-1
lines changed
  • examples/documentation/src/main/java/com/alibaba/cloud/ai/examples/documentation/framework/tutorials

1 file changed

+6
-1
lines changed

examples/documentation/src/main/java/com/alibaba/cloud/ai/examples/documentation/framework/tutorials/SkillExample.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,12 @@ public static void main(String[] args) {
252252
System.err.println("Error executing example: " + e.getMessage());
253253
e.printStackTrace();
254254
} finally {
255-
System.out.println("Cleaning up resources...");
255+
// Note: PythonTool instances created inside progressiveToolDisclosure(...)
256+
// register a JVM shutdown hook that closes the underlying GraalVM context.
257+
// In this tutorial main method we do not keep a direct reference to those
258+
// tools, so there is no explicit close() call here; the shutdown hook
259+
// performs the required cleanup when the JVM terminates.
260+
System.out.println("Cleaning up resources (PythonTool will be closed by its shutdown hook)...");
256261
}
257262
}
258263

0 commit comments

Comments
 (0)