@@ -69,6 +69,11 @@ impl Handle<Closed> {
69
69
///
70
70
/// Depending on the `directory` configuration, intermediate directories will be created, and depending on `cleanup` empty
71
71
/// intermediate directories will be removed.
72
+ ///
73
+ /// ### Warning of potential leaks
74
+ ///
75
+ /// Without [signal handlers](crate::signal) installed, tempfiles will remain once a termination
76
+ /// signal is encountered as destructors won't run. See [the top-level documentation](crate) for more.
72
77
pub fn at ( path : impl AsRef < Path > , directory : ContainingDirectory , cleanup : AutoRemove ) -> io:: Result < Self > {
73
78
Ok ( Handle {
74
79
id : Handle :: < ( ) > :: at_path ( path. as_ref ( ) , directory, cleanup, Mode :: Closed ) ?,
@@ -92,6 +97,11 @@ impl Handle<Writable> {
92
97
///
93
98
/// Depending on the `directory` configuration, intermediate directories will be created, and depending on `cleanup` empty
94
99
/// intermediate directories will be removed.
100
+ ///
101
+ /// ### Warning of potential leaks
102
+ ///
103
+ /// Without [signal handlers](crate::signal) installed, tempfiles will remain once a termination
104
+ /// signal is encountered as destructors won't run. See [the top-level documentation](crate) for more.
95
105
pub fn at ( path : impl AsRef < Path > , directory : ContainingDirectory , cleanup : AutoRemove ) -> io:: Result < Self > {
96
106
Ok ( Handle {
97
107
id : Handle :: < ( ) > :: at_path ( path. as_ref ( ) , directory, cleanup, Mode :: Writable ) ?,
@@ -102,6 +112,11 @@ impl Handle<Writable> {
102
112
/// Create a registered tempfile within `containing_directory` with a name that won't clash, and clean it up as specified with `cleanup`.
103
113
/// Control how to deal with intermediate directories with `directory`.
104
114
/// The temporary file is opened and can be written to using the [`with_mut()`][Handle::with_mut()] method.
115
+ ///
116
+ /// ### Warning of potential leaks
117
+ ///
118
+ /// Without [signal handlers](crate::signal) installed, tempfiles will remain once a termination
119
+ /// signal is encountered as destructors won't run. See [the top-level documentation](crate) for more.
105
120
pub fn new (
106
121
containing_directory : impl AsRef < Path > ,
107
122
directory : ContainingDirectory ,
0 commit comments