Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] csound5gui and winsound stop/exit crashes on Windows

Date2008-02-24 00:23
From"Michael Gogins"
SubjectRe: [Cs-dev] csound5gui and winsound stop/exit crashes on Windows
You can use the Csound memory manager in C++ code -- to allocate C style 
structs, not C++ style structs. A C++ struct is a class in which all members 
are be default and all the semantics of a C++ struct otherwise are identical 
to the semantics of a C++ class.

Regards,

----- Original Message ----- 
From: "victor" 
To: "Developer discussions" 
Sent: Saturday, February 23, 2008 5:23 PM
Subject: Re: [Cs-dev] csound5gui and winsound stop/exit crashes on Windows


> In other words, we just have to be careful not to use the Csound
> memory functions in C++ code, is that not the bottom line?
>
> Victor
> ----- Original Message ----- 
> From: "Michael Gogins" 
> To: "Developer discussions" 
> Sent: Saturday, February 23, 2008 9:44 PM
> Subject: [Cs-dev] csound5gui and winsound stop/exit crashes on Windows
>
>
>> Fixed a major bug in which the Csound memory manager (C style) was
>> allocating and deallocating a C++ structure (WIDGETS_GLOBALS).
>> If new is not called for WIDGETS_GLOBALS, the constructors of its
>> std::vector collections are not called. Then in the widget
>> csoundDestroyModule function, invalid vectors are iterated,
>> causing an access violation. Fixed by using standard C++
>> new and delete for the structure to ensure proper creation of its
>> vector members. This is OK because by calling csoundModuleInit
>> and csoundModuleDestroy, Csound is permitting the module to
>> manage its own memory.
>>
>> This was causing csound5gui to crash on exit or stopping in the MSVC
>> build.
>>
>> Regards,
>> Mike
>>
>> -------------------------------------------------------------------------
>> This SF.net email is sponsored by: Microsoft
>> Defy all challenges. Microsoft(R) Visual Studio 2008.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> Csound-devel mailing list
>> Csound-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Csound-devel mailing list
> Csound-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/csound-devel 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-02-24 00:40
From"Andres Cabrera"
SubjectRe: [Cs-dev] csound5gui and winsound stop/exit crashes on Windows
AttachmentsNone