title: Unable to read memory in Windows, not in MacOs. Acces violation reading location
body: <p>I've been working on an application in c++. 
  I'm trying to create multiple objects from the same class. In Xcode this all works perfectly. But in Visual Studio I keep getting errors. When trying to debug I get an "acces violation reading location 0x00000008", and I get a few errors saying "Unable to read memory".</p>
  
  <p>So i get that the issue is that I'm trying to call this class to an object twice, because a class being called from that first class, is the one saying it can't read the memory. </p>
  
  <p>But why is this an issue on Windows and not on MacOS. I have transferred all my stuff to the windows computer and now this is an issue. I don't really think it'll be something thats specifically wrong in the class. The class that gives the issues is as following:</p>
  
  <pre><code>class AbstractByteSink
  {
  public:
      virtual ~AbstractByteSink()
      {
      }
      virtual std::size_t writeByte(uint8_t data) = 0;
      virtual std::size_t writeByte(const uint8_t* buffer, std::size_t size) = 0;
      virtual std::size_t writeByte(const std::vector&lt;uint8_t&gt;&amp; buffer) = 0;
      virtual std::size_t writeByte(const std::string&amp; buffer) = 0;
      virtual std::size_t writeByte(const AbstractByteSource&amp; buffer) = 0;
  
  };
  </code></pre>
  
  <p>If anyone can tell me why this is a problem on Windows, and how I could possibly fix this, you will be thanked.</p>