blob: 503cce73d17c1e7ed965672f7308be15f126ae0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
with Unchecked_Deallocation;
package body Prot2_Pkg2 is
protected type Rec is
private
M : T;
end Rec;
protected body Rec is end;
procedure Create (B : out Id) is
begin
B := new Rec;
end;
procedure Delete (B : in out Id) is
procedure Free is new Unchecked_Deallocation(Object => Rec, Name => Id);
begin
Free (B);
end;
end Prot2_Pkg2;
|