Comments (9)
Here is a workaround:
using (var memoryStream = MemoryStreamManager.GetStream())
{
// write to the memoryStream
// use a cast to make it work
var buffer = ((RecyclableMemoryStream)memoryStream).GetBuffer();
}
from microsoft.io.recyclablememorystream.
from microsoft.io.recyclablememorystream.
Runtime is .Net Core 2.0.
I now realize that prior to NetStandard 2.0 the class MemoryStream
had no method GetBuffer
at all.
from microsoft.io.recyclablememorystream.
from microsoft.io.recyclablememorystream.
@doubleyewdee Here's a good reference on which platforms implement GetBuffer() : https://apisof.net/catalog/System.IO.MemoryStream.GetBuffer()
from microsoft.io.recyclablememorystream.
Hmmm.. Does this library work on .Net Core 2.0 now? Thanks.
from microsoft.io.recyclablememorystream.
@doubleyewdee Do you know when you might be able to land a patch for this issue?
from microsoft.io.recyclablememorystream.
Any updates?
from microsoft.io.recyclablememorystream.
I believe this has been resolved now. There are targets for 2.0 as of a month ago. Closing.
from microsoft.io.recyclablememorystream.
Related Issues (20)
- Is there a plan to contribute to the dotnet/runtime? HOT 4
- FeatureRequest: Add opt-in possibility to zeroed-out buffers HOT 10
- Continous benchmarking HOT 1
- Multiple StreamManagers in referenced libraries - how to find total memory usage HOT 1
- Large pool limit should apply to whole pool, not each slot HOT 1
- Humanitarian Organization Team mbrgi
- ResponseTime is almost doubled with RecyclableMemoryStream. HOT 5
- Question: GetStream copy existing buffer use case HOT 1
- How effective is this package for buffers that are usually smaller than 256 bytes? HOT 1
- Consider using ArrayPool<byte> as underlying storage mechanism HOT 4
- Breaking changes at 3.0.0 version break OfficeOpenXml NuGet package HOT 11
- Guideline about cryptography with RMS HOT 5
- Unclear Documentation for MaximumFreeSmallPoolBytes
- Upgrade blocker: Recent change of GetStream() to return RecyclableMemoryStream instead of MemoryStream HOT 1
- why just pool MemoryStream HOT 2
- FileStreamResult: ObjectDisposedException: Cannot access a disposed object. HOT 4
- For many small stream writes, RecyclableMemoryStream is slower than other implementations HOT 4
- ETW event source is not working HOT 2
- Use of RecyclableMemoryStreamManager with Confluent.Kafka HOT 2
- RecyclableMemoryStream.TryGetBuffer causes infinite loop when UseExponentialLargeBuffer is true HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microsoft.io.recyclablememorystream.