title: How to create pointers Unreal Engine 4?
body: <p>In the blueprintable class I define the pointer at <code>FJsonValue</code>.</p>
  
  <pre><code>private:
      TSharedPtr&lt;FJsonValue, ESPMode::ThreadSafe&gt; JsonValue;
  </code></pre>
  
  <p>After calling the method that allocates memory, I got the null object...</p>
  
  <pre><code>void UDictValue::SetInt(float value)
  {
      ValueType = EDictValueType::VT_INT;
      JsonValue = MakeShareable(new FJsonValueNumber(value));
      GEngine-&gt;AddOnScreenDebugMessage(-1, 15.0f, FColor::Red, "test");
  }
  </code></pre>
  
  <p><code>MakeShareable</code> in fact allocates new memory. Debugger says about the address where that was allocated... But after returning from function, pointer drops immediately (<code>JsonValue = NULL</code>)</p>
  
  <p>Whats wrong? Is this GC? But I need this pointer after calling of this method.</p>