I just learned that pchar is not ref counted like I used to think so I’m curious why this code doesn’t fail. Shouldn’t this crash because I free TStringList and then access GetText?
strings := TStringList.Create;
strings.LoadFromFile(vertexShaderPath);
vertexShaderSource := strings.GetText;
strings.Free;
glShaderSource(vertexShaderID, 1, @vertexShaderSource, nil);Regards,
Ryan Joseph
