You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// A new buffer will be created using the given allocator and the value will be copied in.
90
+
/// A new buffer will be created using the given <param name="copyAllocator"> and the value will be copied in.
87
91
/// FastBufferReader will then own the data.
88
92
///
89
-
/// The exception to this is when the allocator passed in is Allocator.None. In this scenario,
93
+
/// The exception to this is when the <param name="copyAllocator"> passed in is Allocator.None. In this scenario,
90
94
/// ownership of the data remains with the caller and the reader will point at it directly.
91
95
/// When created with Allocator.None, FastBufferReader will allocate some internal data using
92
-
/// Allocator.Temp, so it should be treated as if it's a ref struct and not allowed to outlive
96
+
/// Allocator.Temp so it should be treated as if it's a ref struct and not allowed to outlive
93
97
/// the context in which it was created (it should neither be returned from that function nor
94
-
/// stored anywhere in heap memory).
98
+
/// stored anywhere in heap memory). This is true, unless the <param name="internalAllocator"> param is explicitly set
99
+
/// to i.e.: Allocator.Persistent in which case it would allow the internal data to Persist for longer, but the caller
100
+
/// should manually call Dispose() when it is no longer needed.
95
101
/// </summary>
96
102
/// <param name="buffer"></param>
97
-
/// <param name="allocator"></param>
103
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
/// <param name="internalAllocator">The allocator type used for internal data when this reader points directly at a buffer owned by someone else</param>
@@ -112,18 +119,18 @@ public unsafe FastBufferReader(NativeArray<byte> buffer, Allocator allocator, in
112
119
/// and ensure the FastBufferReader isn't used outside that block.
113
120
/// </summary>
114
121
/// <param name="buffer">The buffer to copy from</param>
115
-
/// <param name="allocator">The allocator to use</param>
122
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
116
123
/// <param name="length">The number of bytes to copy (all if this is -1)</param>
117
124
/// <param name="offset">The offset of the buffer to start copying from</param>
@@ -137,87 +144,94 @@ public unsafe FastBufferReader(ArraySegment<byte> buffer, Allocator allocator, i
137
144
/// and ensure the FastBufferReader isn't used outside that block.
138
145
/// </summary>
139
146
/// <param name="buffer">The buffer to copy from</param>
140
-
/// <param name="allocator">The allocator to use</param>
147
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
141
148
/// <param name="length">The number of bytes to copy (all if this is -1)</param>
142
149
/// <param name="offset">The offset of the buffer to start copying from</param>
/// Create a FastBufferReader from an existing byte buffer.
157
164
///
158
-
/// A new buffer will be created using the given allocator and the value will be copied in.
165
+
/// A new buffer will be created using the given <param name="copyAllocator"> and the value will be copied in.
159
166
/// FastBufferReader will then own the data.
160
167
///
161
-
/// The exception to this is when the allocator passed in is Allocator.None. In this scenario,
168
+
/// The exception to this is when the <param name="copyAllocator"> passed in is Allocator.None. In this scenario,
162
169
/// ownership of the data remains with the caller and the reader will point at it directly.
163
170
/// When created with Allocator.None, FastBufferReader will allocate some internal data using
164
171
/// Allocator.Temp, so it should be treated as if it's a ref struct and not allowed to outlive
165
172
/// the context in which it was created (it should neither be returned from that function nor
166
-
/// stored anywhere in heap memory).
173
+
/// stored anywhere in heap memory). This is true, unless the <param name="internalAllocator"> param is explicitly set
174
+
/// to i.e.: Allocator.Persistent in which case it would allow the internal data to Persist for longer, but the caller
175
+
/// should manually call Dispose() when it is no longer needed.
167
176
/// </summary>
168
177
/// <param name="buffer">The buffer to copy from</param>
169
-
/// <param name="allocator">The allocator to use</param>
178
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
170
179
/// <param name="length">The number of bytes to copy</param>
171
180
/// <param name="offset">The offset of the buffer to start copying from</param>
/// <param name="internalAllocator">The allocator type used for internal data when this reader points directly at a buffer owned by someone else</param>
/// Create a FastBufferReader from a FastBufferWriter.
179
189
///
180
-
/// A new buffer will be created using the given allocator and the value will be copied in.
190
+
/// A new buffer will be created using the given <param name="copyAllocator"> and the value will be copied in.
181
191
/// FastBufferReader will then own the data.
182
192
///
183
-
/// The exception to this is when the allocator passed in is Allocator.None. In this scenario,
193
+
/// The exception to this is when the <param name="copyAllocator"> passed in is Allocator.None. In this scenario,
184
194
/// ownership of the data remains with the caller and the reader will point at it directly.
185
195
/// When created with Allocator.None, FastBufferReader will allocate some internal data using
186
196
/// Allocator.Temp, so it should be treated as if it's a ref struct and not allowed to outlive
187
197
/// the context in which it was created (it should neither be returned from that function nor
188
-
/// stored anywhere in heap memory).
198
+
/// stored anywhere in heap memory). This is true, unless the <param name="internalAllocator"> param is explicitly set
199
+
/// to i.e.: Allocator.Persistent in which case it would allow the internal data to Persist for longer, but the caller
200
+
/// should manually call Dispose() when it is no longer needed.
189
201
/// </summary>
190
202
/// <param name="writer">The writer to copy from</param>
191
-
/// <param name="allocator">The allocator to use</param>
203
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
192
204
/// <param name="length">The number of bytes to copy (all if this is -1)</param>
193
205
/// <param name="offset">The offset of the buffer to start copying from</param>
/// <param name="internalAllocator">The allocator type used for internal data when this reader points directly at a buffer owned by someone else</param>
/// Create a FastBufferReader from another existing FastBufferReader. This is typically used when you
201
-
/// want to change the allocator that a reader is allocated to - for example, upgrading a Temp reader to
214
+
/// want to change the copyAllocator that a reader is allocated to - for example, upgrading a Temp reader to
202
215
/// a Persistent one to be processed later.
203
216
///
204
-
/// A new buffer will be created using the given allocator and the value will be copied in.
217
+
/// A new buffer will be created using the given <param name="copyAllocator"> and the value will be copied in.
205
218
/// FastBufferReader will then own the data.
206
219
///
207
-
/// The exception to this is when the allocator passed in is Allocator.None. In this scenario,
220
+
/// The exception to this is when the <param name="copyAllocator"> passed in is Allocator.None. In this scenario,
208
221
/// ownership of the data remains with the caller and the reader will point at it directly.
209
222
/// When created with Allocator.None, FastBufferReader will allocate some internal data using
210
223
/// Allocator.Temp, so it should be treated as if it's a ref struct and not allowed to outlive
211
224
/// the context in which it was created (it should neither be returned from that function nor
212
225
/// stored anywhere in heap memory).
213
226
/// </summary>
214
227
/// <param name="reader">The reader to copy from</param>
215
-
/// <param name="allocator">The allocator to use</param>
228
+
/// <param name="copyAllocator">The allocator type used for internal data when copying an existing buffer if other than Allocator.None is specified, that memory will be owned by this FastBufferReader instance</param>
216
229
/// <param name="length">The number of bytes to copy (all if this is -1)</param>
217
230
/// <param name="offset">The offset of the buffer to start copying from</param>
/// <param name="internalAllocator">The allocator type used for internal data when this reader points directly at a buffer owned by someone else</param>
0 commit comments