# createInputStream behaviour change?

**URL:** <https://forum.juce.com/t/createinputstream-behaviour-change/39185>\
**Category:** General JUCE discussion\
**Created:** [May 3, 2020, 11:35pm UTC](https://forum.juce.com/t/createinputstream-behaviour-change/39185 "2020-05-03T23:35:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![splintersilk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/splintersilk/32/14724_2.png) [@splintersilk](https://forum.juce.com/u/splintersilk)\
**Post date:** [May 3, 2020, 11:35pm UTC](https://forum.juce.com/t/createinputstream-behaviour-change/39185/1 "2020-05-03T23:35:35Z")

</div>

Hey there

After updating to the latest Dev branch commit (having been 120 commits behind) I’m finding that this:  
`InputStream* stream = inputURL.createInputStream (false);`  
where inputURL is an URL, now errors with:

`No viable conversion from 'std::unique_ptr<InputStream>' to 'juce::InputStream *'`

For ages this wasn’t a problem, and I don’t understand why it is now. Any thoughts or suggestions would be very much appreciated!

Cheers

Jeff

---

<div class="post-metadata">

**Author:** ![otristan](https://avatars.discourse-cdn.com/v4/letter/o/f0a364/32.png) [@otristan](https://forum.juce.com/u/otristan)\
**Post date:** [May 4, 2020, 6:44am UTC](https://forum.juce.com/t/createinputstream-behaviour-change/39185/2 "2020-05-04T06:44:08Z")

</div>

return type has been changed from `InputStream* to std::unique_ptr<InputStream>`  
so you need to udpate your code accordingly

an easy way is  
`InputStream* stream = inputURL.createInputStream (false).release();`

but it’s probably best to use the RAII possibility of the unique\_ptr

---

<div class="post-metadata">

**Author:** ![splintersilk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/splintersilk/32/14724_2.png) [@splintersilk](https://forum.juce.com/u/splintersilk)\
**Post date:** [May 5, 2020, 6:30am UTC](https://forum.juce.com/t/createinputstream-behaviour-change/39185/3 "2020-05-05T06:30:58Z")

</div>

Hey @otristan  
Much appreciate the reply. That actually makes sense now, even to me. Thanks for pointing (lol) that out 🙂
