[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Help with GSL Matrices
From: |
John D Lamb |
Subject: |
Re: [Help-gsl] Help with GSL Matrices |
Date: |
Sun, 11 Jun 2006 16:36:21 +0100 |
User-agent: |
Thunderbird 1.5 (X11/20060317) |
Jochen Küpper wrote:
> John D Lamb <address@hidden> writes:
>
>
>> gsl_matrix_free( b );
>>
>
> [...]
>
>
>> Exceptions are only really designed to handle the third case.
>>
>
> Will "free" really throw an exception when compiled by a C++ compiler?
Come to think of it, probably not. I don't think exceptions are defined
for alloc and free and if they were, then behaviour like new and delete
might make sense. delete doesn't throw exceptions; so free ought not to
either.
gsl_matrix_alloc and gsl_matrix free behave like alloc and free and so I
guess gsl_matrix_alloc returns 0 on failure and gsl_matrix_free should
not be called with a null pointer.
In any case, it's more sensible to check whether pointers are null and
set them null after freeing a matrix than to try to use
exception-handling to deal with gsl_matrices allocation and destruction.
--
JDL
- [Help-gsl] Help with GSL Matrices, adarsh, 2006/06/10
- Message not available
- Re: [Help-gsl] Help with GSL Matrices, John D Lamb, 2006/06/11
- Re: [Help-gsl] Help with GSL Matrices, Jochen Küpper, 2006/06/11
- Re: [Help-gsl] Help with GSL Matrices,
John D Lamb <=
- free (was: [Help-gsl] Help with GSL Matrices), Jochen Küpper, 2006/06/11
- [Help-gsl] Re: free, John D Lamb, 2006/06/11
- [Help-gsl] Re: free, Jochen Küpper, 2006/06/11
- [Help-gsl] Re: free, Brian Gough, 2006/06/12
- Re: [Help-gsl] Re: free, John D Lamb, 2006/06/12
- Re: [Help-gsl] Re: free, Jochen Küpper, 2006/06/12
- Re: [Help-gsl] Re: free, Brian Gough, 2006/06/14
Re: [Help-gsl] Help with GSL Matrices, adarsh, 2006/06/11