# Subject.unsafeMake

Immediately allocates a `Subject` with the requested replay capacity and manual ownership.

## Signatures

```ts
export declare function unsafeMake<A, E = never>(replay?: number): Subject<A, E>;
```

## Why

`unsafeMake` is the escape hatch for owners that cannot acquire through an Effect `Scope`, such
as a long-lived host object with its own explicit teardown. Prefer `make` inside Effect programs.

## Ownership and lifetime

Allocation is synchronous and starts no fibers. The caller must execute `interrupt` to close
subscribers and clear retained `Exit` values. Capacity `0` retains nothing, capacity `1` retains
the latest publication, and larger capacities retain the newest window in FIFO replay order.

## Errors

Invalid capacities throw `Cause.IllegalArgumentError` synchronously; this function has no typed
Effect error channel. Publishing and subscribing use the `E` and service channels of the returned
subject.

## Examples

```ts
import { Effect } from "effect"
import * as Subject from "@typed/fx/Subject"

const events = Subject.unsafeMake<string>(10)

const shutdown = events.interrupt
const publish = events.onSuccess("ready").pipe(Effect.asVoid)
```
