Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Function

deinit

Public Function
std.zig.Directories.deinit
pub fn deinit(dirs: *Directories, io: Io) void

Params

File

zig.zig:1368
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
    pub fn deinit(dirs: *Directories, io: Io) void {
        // The local and global caches could be the same.
        const close_local = dirs.local_cache.handle.handle != dirs.global_cache.handle.handle;
        const close_build_root = dirs.build_root.handle.handle != Io.Dir.cwd().handle;

        dirs.global_cache.handle.close(io);
        if (close_local) dirs.local_cache.handle.close(io);
        dirs.zig_lib.handle.close(io);
        if (close_build_root) dirs.build_root.handle.close(io);
    }