[ 
https://issues.apache.org/jira/browse/XERCESC-1815?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609762#action_12609762
 ] 

David Bertoni commented on XERCESC-1815:
----------------------------------------

A few comments:

1. In general, I'm opposed to a default parameter for the MemoryManager.  When 
we first did the pluggable memory management implementation, MemoryManager 
parameters were propagated throughout the code, which defaulted to the global 
instance.  This caused a huge number of bugs where the global instance was used 
implicitly when it should not have been.  These bugs are extremely difficult to 
find, because they had to be diagnosed at run time, rather than at compile time.

I'd prefer to make it more difficult for that sort of thing to happen in the 
future.  Particularly in this case, because I doubt makeNewLCPTTranscoder() 
occurs in any user code.

2. +1 to removing the default argument.  If I had the time, and there were no 
objections, I'd remove them from almost every API, reserving them for the more 
public things like InputSource, etc.

> Propagate MemoryManager into transcoders
> ----------------------------------------
>
>                 Key: XERCESC-1815
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1815
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: Nightly build (please specify the date)
>            Reporter: David Bertoni
>            Assignee: David Bertoni
>         Attachments: patch.diff
>
>
> This patch propagates a MemoryManager instance into the transcoders, so they 
> don't inadvertantly use the global MemoryManager instance.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to