Skip to content

VR_Init() memory leak on failure? #310

@JoshuaHintze

Description

@JoshuaHintze

I am creating a background application that monitors tracked devices. When I initialize I have a simple check to make sure steamVR is even running. It is as follows:

        vr::EVRInitError eVRInitError;
	vr::VR_Init(&eVRInitError, vr::VRApplication_Background);
	if (!vr::VRSystem() || eVRInitError != vr::VRInitError_None)
	{
		vr::VR_Shutdown();
		return;
	}

The issue I am seeing is when it fails it leaks a little bit of memory. I have tried this with and withour vr::VR_Shutdown(). If I bring it to the extreme example of running this 10 times a second it leaks about 1 Meg of RAM per second. The output from visual studio shows the steamVR dll's loading and unloading but there is some residual memory loss.

How have other people checked for steam running without killing their application if it is not?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions