Skip to content

Update CreateColorProfileFromLogColorSpace to steer people away from a memory leak #2025

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If the **lcsFilename** \[0\] member if the [**LOGCOLORSPACEA**](/windows/desktop

## -remarks

This function can be used with ASCII or Unicode strings. The buffer created by this function must be freed by the caller when it is no longer needed or there will be a memory leak. The [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree) function should be used to free this buffer.
This function can be used with ASCII or Unicode strings. The buffer created by this function must be freed by the caller when it is no longer needed or there will be a memory leak. Use the [GlobalHandle](/windows/win32/api/winbase/nf-winbase-globalhandle) function to retrieve the handle for the buffer, and then use the [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree) function to free the handle.

This function does not support Windows Color System (WCS) profiles CAMP, DMP, and GMMP.

Expand All @@ -74,3 +74,4 @@ This function does not support Windows Color System (WCS) profiles CAMP, DMP, an
* [Basic color management concepts](/windows/win32/wcs/basic-color-management-concepts)
* [Functions](/windows/win32/wcs/functions)
* [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree)
* [GlobalHandle](/windows/win32/api/winbase/nf-winbase-globalhandle)
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ If the **lcsFilename** \[0\] member if the [**LOGCOLORSPACEA**](/windows/desktop

## -remarks

This function can be used with ASCII or Unicode strings. The buffer created by this function must be freed by the caller when it is no longer needed or there will be a memory leak. The [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree) function should be used to free this buffer.
This function can be used with ASCII or Unicode strings. The buffer created by this function must be freed by the caller when it is no longer needed or there will be a memory leak. Use the [GlobalHandle](/windows/win32/api/winbase/nf-winbase-globalhandle) function to retrieve the handle for the buffer, and then use the [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree) function to free the handle.

This function does not support Windows Color System (WCS) profiles CAMP, DMP, and GMMP.

Expand All @@ -74,3 +74,4 @@ This function does not support Windows Color System (WCS) profiles CAMP, DMP, an
* [Basic color management concepts](/windows/win32/wcs/basic-color-management-concepts)
* [Functions](/windows/win32/wcs/functions)
* [GlobalFree](/windows/win32/api/winbase/nf-winbase-globalfree)
* [GlobalHandle](/windows/win32/api/winbase/nf-winbase-globalhandle)